Explanation of satellite data from a programmer’s perspective
I have started reading Part 2 of Introduction to Algorithms and in the section The structure of the data the author/authors says in the context of sorting a sequence of numbers:
What’s so bad about pointers in C++?
To continue the discussion in Why are pointers not recommended when coding with C++?
Functions returning pointers
C++ noob here. I have a very basic question about a construct I found in the C++ book I am reading.
C simple arrays and pointers question
So here’s the confusion, let’s say I declare an array of characters
C++ Pointers: Number of levels of Indirection
In a C++ program that doesn’t contain legacy C code, is there a guideline regarding the maximum number of levels of indirection that should be used in the source code? I know that in C (as opposed to C++), some programmers have used pointers to pointers for a multiple dimension array, but for the case of arrays, there are data structures in C++ that can be used to avoid the pointers to pointers.
What’s a good way to explain the need for pointing to a pointer?
Understanding what a pointer (an address) is, is fairly easy and an eleven-year old can understand it. But how do we express why we have a need for a pointer to a pointer? what is a very pedagogical example? Does it extend to pointing to a pointer to a pointer (and/or onward)?
What happens when using address before it’s allocated?
The very simple piece of C++ code below is incorrect, it’s easy to see why and tools like Valgrind will tell you. In running several C++ codes containing this kind of error, I noticed that each time, it ended up with a Segmentation fault
at the line which tries to use the address.
C++ Typecasting VS performance
Let’s say we’re designing a video game. We have some sprites on the map and we want to call some method of the particular sprite at some particular position.
In C++ why and how are virtual functions slower?
Can anyone explain in detail, how exactly the virtual table works and what pointers are associated when virtual functions are called.
Converting ‘char*’ to ‘char’. Am I passing this array correctly? [closed]
Closed 11 years ago.