Hi im writing a program for my c++ class and im having trouble reading a file and inputing into a twodimensional array. When i run the program, it gives me its some numbers, im thinking its the ascii values for each number
It probably has to do with the fact the file contains ASCII characters so you can read it in text format. These characters are different from actual integer values in coding. Just as an example the byte that contains an '1' character looks like this 0011 0001 as apposed to a byte containing a integer value of 1
looks like this 0000 0001. You cannot perform math on ASCII characters(at least when not expecting a proper result).
When you input the value into the integer matrix it is not changing the value but just storing the same value in a memory location of size int.