I'm writing a program that counts each printable character (ASCII 32-126)using an array and outputs the count for each character. The output will only be the characters found in the text file. Any tips?
First of all, you're accessing out-of-bounds elements on lines 21 and 33.
Using .eof() on ifstream objects is iffy, and will usually not perform the way you want or expect it to.