Originally Posted by
Malcolm McLean
You want to create a histogram of all characters in a file. Characters are 8 bit, so the easiest way to do this is to declare a 256-member array of ints and initialise them all to zero. Then go through the file, as you are doing, and for each use the character as an index into the array, and increment it. There's no need to store the file in memory.