I am trying to read a file to create the structures for a small 2d game.
I am reading in integer numbers to construct the walls.
At the moment I am using getline and have each number on a seperate line
But I want to be able to read each box (four walls) on the same line
What syntax can I do this with?
Below is my current code
readAmount = atoi(inputLine.c_str());
rectWalls[i] = atoi(inputLine.c_str()); //converts inputLine string Var to integer, via c to c++ conversion
polygon(mapBuffer,4, rectWalls, makecol(255, 0, 0));