int matrix with pointers in C - memory allocation confusion

后端 未结 7 1319
春和景丽
春和景丽 2020-12-18 05:01

I\'m having some issues with producing an int matrix without creating memory leaks. I want to be able to make a given (global) matrix into any size dynamically via read_matr

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-18 05:32

    I recommend using valgrind to track down unfree'd memory, as opposed to trying to make a bus error occur. It rocks for lots of other stuff as well.

    Sam

提交回复
热议问题