123456789101112
void num_chars(vector<string> words) { ifstream fin(words[1]); char z = fin.get(); int char_count = 0; while (!fin.eof()) { ++char_count; z = fin.get(); } cout << words[1] << " contains " << char_count << " characters. \n\n"; }