Hey guys, I was trying to make code that would count how many times the word hello appears in a text files but the code below doesn't compile so I was just wondering where I when wrong?
Thanks.
Code:char ch [10000] int v_word; ifstream file("c://test.txt"); if (file.is_open()) { while (! file.eof() ) { while (file.getline(ch)) { if(ch=="hello") v_word++ } } } file.close();