Pointers do not have to point to variables. They can point to allocated memory blocks that do not have a "normal" name.
Edit: An example:
Code:
#include <iostream>
int main() {
int size;
std::cout << "How many numbers do you need? ";
std::cin >> size;
int *pointer_to_int = new int[size]; //Set aside enough memory for size ints. It has no name, but is pointed to.
std::cout >> "Off you go: ";
for (int i = 0; i < size; i++)
std::cin >> pointer_to_int[i]; //index notation works on pointers too
for (int i = 0; i < size; i++)
std::cout << pointer_to_int[i] << std::endl;
delete[] pointer_to_int; //give the memory back to the operating system
return 0;
}
I only typed the code in the box, I didn't compile it, but I didn't intentionally put any errors in.