- #1
Cinimod
- 34
- 0
I am stuck on a program where I need to open a file, and print out the contents to a screen, but at the same time, I want to save each character in the file (spaces included) to an element of an array. However, I am having a problem opening the file and going through it character by character (I don't know if there are any functions already available to help me with this). What I have at the moment prints off the file to screen, but stops at the first whitespace it encounters. I ideally want to be able to do it in both C and C++, but at the moment, I am having trouble just doing it in the one language.