pointers
C++: Any great difference in _implementation_ of the reference and the pointer
I caught that I use references not understanding开发者_Python百科 how they really work (that\'s why I use them not so often).[详细]
2023-04-12 23:40 分类:问答vector of pointers
If I have a definition in a class header such as this: vector<baddie*> baddies; which I then initialise in the constructor like this:[详细]
2023-04-12 23:31 分类:问答C pointer: *p++ and p++ difference
I have just started learning C. void function(char *str1, char *str2) { printf(\"%p\\n\", str1); printf(\"%p\\n\", str2);[详细]
2023-04-12 23:00 分类:问答Boost property_tree for storing pointers
Is it possible to store pointers to objects in boost property trees, and then use an iterator to retrieve the data? I\'m trying to do something like:[详细]
2023-04-12 18:44 分类:问答the meaninings of two ** for an iterator
In the f开发者_运维问答ollowing code segment vector<SceneObject *> sceneObjs; vector<SceneObject *>::iterator iter;[详细]
2023-04-12 18:02 分类:问答Invalidating deleted pointers?
template<typename T> someclass<T>& operator=(const someclass<T>& other) { typename std::vector<T *>::const_iterator rhs;[详细]
2023-04-12 17:04 分类:问答Sizeof Pointer to Array
If I have an array declared like this: int a[3][2]; then why is: sizeof(a+0) == 8 whereas: 开发者_如何学Pythonsizeof(a)== 24[详细]
2023-04-12 16:41 分类:问答Copying Command Line Arguments Into an Array
For a program, I would like to make an array copy of the arguments sent in by command line using malloc().[详细]
2023-04-12 16:40 分类:问答Why doesn't this program segfault?
What causes the output \"Hello\" when I enable -O for gcc ? Shouldn\'t it still segfault (according to this wiki) ?[详细]
2023-04-12 16:39 分类:问答How to make it so the user can't delete a dynamic array?
In writing a response, I wrote some code that challenged my assumptions on how const pointers work. I had assumed const pointers could not be deleted by the delete function, but as you\'ll see from th[详细]
2023-04-12 13:51 分类:问答