Program that reads how many letter 'a' present in a text file
Nov 5, 2015 at 5:21pm
N/A
Last edited on Nov 5, 2015 at 8:45pm
Nov 5, 2015 at 7:25pm
Store the file into a vector of characters, then loop through that vector to check for a specified character.
EDIT:
Seen you haven't done vectors so create a dynamic array of the same size as the file, then loop through:
|
for(int i = 0; i < FileSize; i++) char_array[i] = std::ifstream_object.get();
|
Last edited on Nov 5, 2015 at 7:27pm
Topic archived. No new replies allowed.