Dear developers, programmers
I would like to written this program whit this problem:
Create a program that opens a file and counts the whitspace-separated words in that file
Oke this is my code:
Can someone help my what that main en coded this problem?Code:#include <string> #include <iostream> #include <fstream> #include <iomanip> using namespace std; int main() { ifstream in("test.cpp"); string s, line; while(getline(in,line)) { / I don't know what I can put here } //cout << line << s; return(0); }
"counts the whitspace-separated words in that file"
Thanks
S