-
-
Save jitpaul/f99ac952374d8175a8981e17f2272690 to your computer and use it in GitHub Desktop.
TypeCasting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(){ | |
char a = 'c'; | |
int *b = static_cast<int*>(&a); //Compiler Error | |
cout<<*b; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment