This is what I'm trying to do:
"Write a program which prints a table listing the number of occurrences of the lower-case characters 'a' to 'z' in the file "Sheet5Ex5.cpp". (Save your program in a file of this name so that you can test it on itself.) Write your program as though your computer is short of memory - you should declare only one variable of type "ifstream", one variable of type "char", and two variables of type "int". The program should produce output such as the following:
CHARACTER OCCURRENCES
a 38
b 5
c 35
d 7
e 58
f 8
g 8
h 21
i 32
j 0
k 0
l 19
m 16
n 34
o 22
p 8
q 0
r 48
s 17
t 61
u 15
v 0
w 4
x 4
y 0
z 1
"
I made "Sheet5Ex5.cpp" file,and added bunch of radnom text inside it, and I made the code. My output is that letter 'a' is counted 169 times,and all other letters are counted 0 times. This is the code: