Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Can someone explain me what does the right side (after the equals sign) means ? I am casting an integer literal to a pointer or what ? I am confused
C++
int *var = (int *)1234;


What I have tried:

Asking here in CodeProject.COM
Posted
Updated 24-Aug-17 11:23am

1 solution

All this is doing is returning a pointer to memory address 1234, which in Windows will probably get you a security exception if you try to read what's there from your code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900