Since this program has to run until the end of a file, the outermost loop in main() is going to be something like
//open file here
//print the header for each column here
while (!file.eof) //if eof has not yet been reached, there is more to do
//read each character from the file, see what kind of character it is, then deal with them independently)
Since leadtail said that you've handled opening the file, I'll skip that part.
There's a few ways to go about actually solving the problem for reading the individual lines. Probably the easiest is to take in an individual character from file, then see what kind of character it is using the different functions in <ctype.h> (make sure to cast the character to an integer when you pass it to functions like isdigit).http://www.cplusplus.com/reference/cctype/
The first check you should do is to see if it is an '@', because then you should print out that line's statistics, and use continue to carry on to the next line.
Also, keep in mind that characters are just stored as integers, and that 'a' is guaranteed to be 1 less than 'b' which is guaranteed to be 1 less than 'c', all the way up to 'z'. The same goes for the uppercase letters (although 'z' and 'A' are separated by more than 1 value). This allows you to use the less than and greater than comparisons on the characters to sort out which is earlier or later.
Hopefully that helps!
In order to read a character from a line, just have a character variable (let's say it's char c) that has been declared out of the loop.
Just use file >> c and that will read the next character from the file.
Then you can check to see what sort of character c is. If you haven't been taught ctype.h and are hesitant to use it, the other way would be to do the following comparisons:
if ('0' <= c && c <= '9') // this will check to see if it is a digit
if ('a' <= c && c <= 'z') // this will check to see if it is a lowercase character
if ('A' <= c && c <= 'Z') // uppercase character
NOTE: it is very important to follow the capitalization and single quotation marks above.
for each situation, then see if it is greater or lesser than the current extreme value you have stored:
let's say you have the variable char lowestDigitThisLineSoFar.
After you have verified that c is a digit (the first if statement above)
if (c < lowestDigitThisLineSoFar) lowestDigitThisLineSoFar = c;
The very first if statement you should have is the if (c == '@') though since you don't want to update anything if that is the character being read.