now let's talk so i was trying to make a dynamic multidimensional array in c++ so i did some research and i came up with code above which actually work pretty fine but not that fine in fact if i try this
i tryed this both on windows and linux and they both do the same thing in fact if i try to make an array with rows=colons it wotk it even work if rows<colons but it dosn't work if rows >colons and sometimes even rows<colons dosn't work
The reason it doesn't work when row < colons is because of the condition on lines 10 and 20.
double **I = newdouble*[row]; creates an array of pointers of length row.
On lines 10 and 20, you are iterating over the array of pointers, col times! So when col <= row, this code seems to work but when col > row, then sht hits the fan and you get that ugly mess.