Jonathan
2005-01-17 20:40:32 UTC
I've tried:
char ch;
ifstream fin("today.txt"); // open input file
while (fin.get(ch)) {
if (ch == "z")
cout << ch;}
fin.close();
but get the error
ISO C++ forbids comparison between pointer and integer
How do I work around this issue?
Thanks,
Jonathan
char ch;
ifstream fin("today.txt"); // open input file
while (fin.get(ch)) {
if (ch == "z")
cout << ch;}
fin.close();
but get the error
ISO C++ forbids comparison between pointer and integer
How do I work around this issue?
Thanks,
Jonathan