Hi, I am trying to read an input text file. And read the last letter only and check if it is an '+' or '*'.
Here is the code I have written so far, if anyone can help me, I would be very greatful.
while(input>>lastChar) //put file contents into lastChar
{
input.seekg(ios::end,lastChar); //go to the end of file
if(lastChar=='+' || lastChar=='*') //check if it is + or *
{
badInput=true;
goto skip;
}
else
{
cout<<"true file"<<endl;
goto startHere;
}
}