char delims = ',';
char* result = NULL;
result = strtok( _buffer, delims );
vector<double> v;
while (result != NULL) { //and !endOfLine
result = strtok( NULL, delims );
v.push_back( atof(result) );
}
InsertInVectorOfVector(v)
char delims = ',';
char* result = NULL;
result = strtok( _buffer, delims );
vector<double> v;
while (result != NULL) { //and !endOfLine
result = strtok( NULL, delims );
v.push_back( atof(result) );
}
InsertInVectorOfVector(v)
To copy to clipboard, switch view to plain text mode
Hello,
I have to read the _buffer into a a vector; problem is that I need also to check when I step over the '\r\n', because in this case I need to insert 'v' in a vector of vector; Is there a way to do that control using strtok() ?
Thanks,
Bookmarks