I\'ve been reading C++ for dummies lately and either the title is a misnomer or they didn\'t count on me. On a section about utilizing arrays of pointers with characters strings they show a function o
I was just experimenting with the use of pointers when dealing with arrays and I\'ve become a bit confused with how C++ is handling the arrays. Here are the relevant bits of code I wrote:
I checked out this thread before posting here: How to avoid memory leaks when using a vector of pointers to dynamically allocated objects in C++?
Yesterday I was attending a talk by a CTO of a reputed European Company, and he told until recently he开发者_运维百科 did not know that java has pointers. On confronting him he said he is absolutely s
I have a vector<some_struct&> array in my code, and whenever I want to add some object to my vector I use array.push_back(*new some_struct). now I\'开发者_C百科m wondering if I should delete
I know this has been hashed over a number of time, but I have come across a case today that shook my understanding of the pointer math/ array index.
Elsewhere the following was suggested for a functor for deleting pointer开发者_如何学运维s in a vector
I know that I can use correctly the WinApi function DsGetDcName like this: DOMAIN_CONTROLLER_INFO* dcInfo = nullptr;
I\'m getting problems with the following type of code: int* myPointer1 = malloc(50 * sizeof(int)); int* myPointer2 = malloc(50 * sizeof(int));
I am going through a legacy, and found the following syntax of C++ to be strange: the class definition follows as: