How can i grep a file using c++..?
I have a file. File having a keyword. i want to get the count of that.
i am tring to do
int count ;
count = system("grep -c keyword file1.txt");
cout << count ; /// this is giving me system command return value not the actual output..
how can i ghet the actual output in c++?
jujose