How can a string recognize an empty line? I'm having an issue debugging because my while loop gets stuck when ever it reaches an empty line (its seems as if strings dont have an 'endl' detector ).
What can I do to let it skip the empty line? Its causing a massive memory leak when that happens (saw it using the debugger).
if (sGetInput.empty()) // or even sGetInput == "K"
{
// DO NOTHING
}
//KING POSITION
elseif (sGetInput == "K")
{
// do stuff
}
//FIRST SPLINE ORBIT
elseif (sGetInput == "O1")
{
// do stuff
}
//SECOND SPLINE ORBIT
elseif (sGetInput == "O2")
{
// do stuff
}
//THIRD SPLINE ORBIT
elseif (sGetInput == "O3")
{
// do stuff
}
//go to new line on black space
....
Why does does ifstream stop when it reaches an empty line? (this isn't the end of my file though) this ends up producing a stack overflow.
And yes it was initialized. The problem is that its seems to be fine at reading the file till its gets to the empty line dividing KING DATA, ORBIT 1...