0

Can I specify a pointer for a variable?

Is there any way i can assign a variable a pointer? something like int num; &num=0x28ff2c;

6th Jul 2017, 4:02 AM
Vote4Pedro
Vote4Pedro - avatar
2 Answers
+ 3
int* num = reinterpret_cast<int*>(0x28ff2c); NOTE: This can be dangerous if you don't know exactly what you're doing.
6th Jul 2017, 4:24 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Thank you!
6th Jul 2017, 4:26 AM
Vote4Pedro
Vote4Pedro - avatar