안녕하세요, MySQL 쿼리에서 행과 열 결과를 처리하기위한 래퍼를 만들려고합니다. 명령.의 리턴 데이터는. 자열 또는 NULL 포인터 일 수 있습니다. 내가이다차원 벡터 문자열
class RowWrapper {
public:
std::vector< std::vector <std::string> > data;
void SetVector(unsigned int rows, unsigned int columns);
};
void RowWrapper::SetVector(unsigned int rows, unsigned int columns)
{
for (int x = 0; x > rows; x++)
{
std::vector<std::string> p_rows;
for (int y = 0; y > columns; y++)
{
p_rows.push_back(x*y); //Error here
}
data.push_back(temp_rows);
}
}
오류가 아마 벡터 또는 문자열에 대한 뭔가가 과부하 기능에 대한 인스턴스가 없습니다 : 그래서 여기 내 시도이다.
'int '를'vector'에 push_back하려고합니다. –
Mat