   [C++] Loading characters into array using fstream
  I have a file with a bunch of characters, they are currently each on seperate lines but I can put them all on one line or on lines according to their placement in the array. Anyway, when I cout one of these characters in the console app it comes out correctly.When I try read a character from the first line as such:char charIn;input >> charIn; //input is the open ifstreamcout << charIn;It prints a different character.Anyway here is where the array comes in. I have an array as such:char theArray[78][23];I am wanting to load the characters into this array.I attempted this like such:for(int i = 0; i < 78; i++){   for(int j = 0; j < 23; j++)   { input >> theArray[j];   }}However this didn't seem to put anything into the array.
  Use input.get( charIn ); to read in a single character.Try input.get( array, arraySize, '\n' ) to read in arraySize characters from a line, but stop at '\n' which will remain in the buffer and have to be removed with another input.get() call. There is also a getline() function you can play with too. I'd only use the >> operator for reading in digits as integers or floats, not characters.   ;  No matter which of those I try it is just reading in ' ' yet the characters in the file are not ' '.   ;  Are you sure the file is opening properly?   ;  To be perfectly honest, no. I should probably check that it is.   ;  LOL! It wasn't even opening T_T wow I feel dumb.   ;  Is there a way to get it to read spaces(' ') from the file?   ;  If you use input.get() yes, but >> will just ignore white space - what >> does is reads everything (skipping leading white space) until it hits whitespace, then stops. So spaces, tabs, new lines, et cetera, are ignored (and left in the buffer, which is important to remember if you switch between >> and get functions). But the get function will get a single character or how ever many you specify until it gets to the delimiter you specify to end on.   ;  Please note that there are a couple overloads of .get(). You should read the documentation, and think carefully about what you want to use.   