How to allocate and deallocate heap memory for 2D array?

前端 未结 6 1259
一向
一向 2020-12-06 01:04

I\'m used to PHP, but I\'m starting to learn C. I\'m trying to create a program that reads a file line by line and stores each line to an array.

So far I have a prog

6条回答
  •  眼角桃花
    2020-12-06 01:36

    If you are using C you will need to implement the resizing of the array yourself. C++ and the SDL has this done for you. It is called a vector. http://www.cplusplus.com/reference/stl/vector/

提交回复
热议问题