Hi. I have a file to read, in this format:
My function is this:Code:0,0,0,0,0,0,0,0,0,0,6,0x01 1,0,0,0,0,0,0,0,0,0,0,0x02 2,0,0,0,0,0,0,0,0,0,0,0x04
Now this reads all values fine and stores them as ints, but the last hex value is always stored as 0. Is there any way to get it to parse the string in as an int?Code:void Tile::ReadTileData(char* line) { char* buffer; buffer = strtok (line, ","); while (buffer != NULL) { tile_data.push_back(atoi(buffer)); buffer = strtok (NULL, ","); } }