map - is a file that I opened. line - string
The upper part works, but the lower part does not.
getline(map, line);
getline(ssvalues, values, '|'); // Gets the name of the tileset file
tileset.loadFromFile(values.c_str());
getline(ssvalues, values, ' '); // Gets the size of the tile
tileSize = atoi(values.c_str());
getline(map, line); // Reads the next line.
ssvalues.str(line);
values = "";
// FROM HERE IT DOESNT WORK, 'values' always empty, why--
getline(ssvalues, values, '|'); // Get the X size of map
std::cout<<values;
mapSize.x = atoi(values.c_str());
getline(ssvalues, values, ' '); // Get the Y size of map
mapSize.y = atoi(values.c_str());
std::cout<<values;
The content of the file that I'm reading is:
tileset.png|32
1200|1200