dynamic-allocation
resource acquisition failure handling [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing th[详细]
2023-03-19 07:15 分类:问答Memory allocation problem when creating a class C++
Still learning C++, and still having specific errors :). I have an object of the following composition:[详细]
2023-03-03 23:25 分类:问答Why do Objective-C objects have to be dynamically allocated?
Why do Objective-c objects have to be dynamically allocated? Why do I have to make it a pointer to an object, unlike in C++ I can create开发者_开发百科 them on stack?[详细]
2023-03-02 13:28 分类:问答weird SIGABORT on malloc/calloc call
running my program with gdb I get this: fem.o: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr)[详细]
2023-02-22 12:41 分类:问答Safe allocation of a structure containing various arrays in c
I have something like this in my cod开发者_开发技巧e typedef struct ts_fem_mesh { double**vertices;[详细]
2023-02-21 15:09 分类:问答Dynamically allocating classes, with Inheritance issue
I am trying to dynamically allocate an array of base(Student) classes, and then assign pointers to derived(Math) classes to each array slot. I can get it to work by creating a single pointer to the ba[详细]
2023-01-25 05:16 分类:问答How do I allocate a 2 D array with contigious memory ? How Do I use it to access rows and columns? Give me an example
I have created a 2 d array which reads as follows int i,j,lx,ly;// lx,ly are the row and column respectively[详细]
2022-12-20 15:41 分类:问答Is it good practice to NULL a pointer after deleting it?
I\'ll start out by saying, use smart pointers and you\'ll never have to worry about this. What are the problems with the following code?[详细]
2022-12-14 15:05 分类:问答