lundi 13 février 2017

Assign pointer address to a variable containing address?

Vote count: 0

I've started learning c++ for a small amount of time. How can I assign a pointer to a variable containing an address? Example:

int* pAddress;
int address;
int newvalue;
std::cin >> address; //Will this work?
std::cin >> newvalue;
pAddress = (int *)address;
newvalue = *pAddress;

asked 58 secs ago

Let's block ads! (Why?)



Assign pointer address to a variable containing address?

Aucun commentaire:

Enregistrer un commentaire