信じられないかもしれませんが、これを検索すると nada が出てきます。
「列」の1つでsのvector
多次元をソートするにはどうすればよいですか?int
よろしくお願いします!
C++
res = mysql_perform_query(conn, "SELECT column1, column2, column3 FROM table1;");
std::vector< std::vector< int > > myVector;
while ((row = mysql_fetch_row(res)) !=NULL){
int rankedID = atoi(row[0]);
std::vector< int > tempRow;
tempRow.push_back(atoi(row[0]));
tempRow.push_back(atoi(row[1]));
tempRow.push_back(atoi(row[2]));
myVector.push_back(tempRow);
}
降順myVector
で並べ替えたいです。myVector[i][1]
再度、感謝します!