int main()
{
{
ifstream inputFile;
// 1. Open the file
inputFile.open(txt);
// 2. Do something ( While file is not end of the line and it's opened)
while (inputFile.is_open() && !inputFile.eof())
{
inputFile >> creatureTxt;
LoadCreature(creatureTxt);
}
// 3. Close the file
inputFile.close();
}
}
Trying to save onto creatureTxt while emptySpace being counted. However, it seems like it's ignoring the emptySpace. I'm trying to avoid using getline().