Possible Duplicate:
What are the differences between pointer variable and reference variable in C++?
I got my head around pointers in C (the basics anyway) and started reading up on C++. The book I'm reading jumps straight into references, and looking in the index doesnt got on to pointers until later on.
In C, I thought if I wanted to do a pass by reference function I would have to use pointers as arguments, e.g.
void swapAandB(int *A, int *B){
//do something
}
But the C++ book, decides to put references to the original variable into the function. e.g.
void swapAandB(int& A, int& B){
//do something
}
My C++ book hasn't explained why we don't use pointers as in C. So I'm a little confused. I guess my question is what's going on here?