I created a fixed lenght string:
string fileRows[900];
But sometimes I need more than 900, and sometimes it would be enough 500.
and after that I need to fill the array with a file rows:
...
string sIn;
int i = 1;
ifstream infile;
infile.open(szFileName);
infile.seekg(0,ios::beg);
while ( getline(infile,sIn ) ) // 0. elembe kiterjesztés
{
fileRows[i] = sIn;
i++;
}
How can i create dynamic lenght for this array?
std::vector<std::string>.