thanks guys for ure help
i figured out what the problem was
i was using
fin>>ch;
but that is error prone and was screwing up in this case
aaaahhhh i know
so i used fin.get(ch)
worked fine
Type: Posts; User: anooj123
thanks guys for ure help
i figured out what the problem was
i was using
fin>>ch;
but that is error prone and was screwing up in this case
aaaahhhh i know
so i used fin.get(ch)
worked fine
i needed to write a prog to display which line a character is found in, in a text file
so basically my problem is checking for the new line or end of line
i mean
if(ch=='\n')
line++;
...