Need help counting the number of characters in a .txt file

Hello, I have recently hit a stump with C++ and have been getting pretty frustrated with this assignment. I just can't seem to find out how to start the assignment. Basically for the first part of the assignment, I need to find the number of characters in this .txt file my teacher provided for me. The only exception is that I can only count the actual letters themselves, not spaces or punctuation. How would I go about doing this? I have read about functions like isalpha but can't figure out on how to fit them into code to do the first part of this assignment. Could someone give me some kind of an example to get headed in the right direction on this?

Thanks for any help,
Torm04
Start by writing a loop that reads each character from the file individually. You should easily spot how to use std::isalpha().
Topic archived. No new replies allowed.