|
|
|
|
|
|
Unhandled exception at 0x00932b71 in ilikecoffee.exe: 0xC0000094: Integer division by zero. |
|
|
|
|
It's running fine for me here. What line is the crash happening on? |
In the second version you are not using a loop so you will only handle the first character in the file which is 'A' so row and cell is still zero when you use them in division. Shouldn't row be initialized to 1 because there is always one row? |
if file1 cannot be opened row remains 0 and your program will crash |
row
to 1 now because of the mistake with counting. thanks for explaining!