i have an input file with several numbers (ie 73296^4832 /n) carrot being a space and /n meaning theres another line of similar type numbers underneath. i'm trying to read them in one at a time into an array as char type and then converting them to integers, easy enough. the problem i'm having is i need my while loop to stop at the end of each line but i can't figure out how!
i tried creating a bool function within the public section of the class that i'm working on that looked like this:
bool eol(const char& k)
{
if (k == '/n')
return true;
else
return false;
}
and proceeded to implement it in my while loop as follows
ins.get(k);
while (!eol(k))
{
...
}
my compiler does not have an error that keeps it from compiling but it says
[Warning] multi-character character constant
[Warning] In function `bool eol(const char&)':
[Warning] comparison is always false due to limited range of data type
and my limited knowledge of c++ is keeping me from coming up with any alternative! does anyone know what i can do to correct this or a better way of testing for end-of-line?