#include #include using namespace std; #include //Create Function int countWords(); int countCharacters(); int main() { cout << countWords("txtdata.text"); return 0; } int countWords( string filename ) { ifstream file( filename.c_str() ); int count = 0; string temp; while (file >> temp) { count = count + 1; } return count; }