私は次の多次元ベクトルを持っています
int main()
{
vector< vector<string> > tempVec;
someFunction(&tempVec);
}
void someFunction(vector< vector<string> > *temp)
{
//this does not work
temp[0]->push_back("hello");
}
ベクトルポインタがある場合、どのようにデータをベクトルにプッシュしますか?以下のコードは機能しません。
temp[0]->push_back("hello");