Lately i've been researching on pointers and memory locations, and something doest seem right to me:
I wrote this little program:
The problem here is that when i run it, the variable c1 is always alocated in the same memory position, and my question is, shouldnt it change every time i run the program??
using namespace std;
int c1 = 3;
cout <<"Variable c == " <<c1 <<", and its located at: " <<(int)&c1 <<endl;
cout <<"Change: ";
cout <<"Variable c == " <<c1 <<" Located at: " <<(int)&c1 <<endl;
and another thing, when i open multiple instances of that program, all the instances show c1 located in the same memory space, how is that possible??