As I said in “Understanding C pointers: Part 0,” I’m going to try to explain how C pointers work. Let’s start with the basics. Here’s some simple C code: int x = 23; int y = x; You can think of each variable as a box which holds the value of that variable. So in [...]
Tag Archives: C
Understanding C pointers: Part 0
Posted by svec on December 28, 2007
2 comments
“C/C++ Pointers are evil. Ditto direct control of memory via malloc, free, new and delete. Java, C# and other ’safe’ languages are the wave of the future, man!” Even if you shouted a hearty, “Amen, brother!” after reading those sentences, the C/C++ languages can teach you something useful. Understanding how to directly control memory with [...]