Dec 20, 2013 at 7:56am UTC
I have written below program to count number of words and lines and print the all the words.
using namespace std;
cout<<"failed in opening file";
string buff("I am wrting a c++ program in filehandling");
cout<<"unable to open file"<<endl;
cout<<"word count is"<<wordcount<<"linecount is"<<linecount<<endl;
Its compiling fine but when executed its dispplaying I infinite times...
No clue where I went wrong.
Guys Please help???
Thanks in advance.
Dec 20, 2013 at 10:50am UTC
Please use code tags when posting code, to make it more readable.
Dec 20, 2013 at 11:57am UTC
Thanks for your reply.
I wrote that in haste,didnt mind much about all these
Thanks for the comments....I will try to improve.