Hi, I'm making a little Chess program for my first C++ project. I've done a whole lot of programming before, so don't worry.
OK, I have two static variables of the ChessPiece class:
static...
Type: Posts; User: BSTRhino
Hi, I'm making a little Chess program for my first C++ project. I've done a whole lot of programming before, so don't worry.
OK, I have two static variables of the ChessPiece class:
static...
Just remember, a pointer just stores a memory address. That's all. That seemed to clear everything up for me.
I don't mean the pointer's memory address as in where it is stored the data is stored, but I mean the memory address it is pointing to.
If you wanted to change the actual pointer's memory address, you would use two * operators (**), showing that you want the memory address of a pointer.
OK, well, a pointer holds a memory address. I'm sure you know that. What you've done in the main function, is give the pointer, p, the memory address of a.
So when you call the function...