Skip to content

Instantly share code, notes, and snippets.

@jitpaul
Last active April 26, 2018 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitpaul/f99ac952374d8175a8981e17f2272690 to your computer and use it in GitHub Desktop.
Save jitpaul/f99ac952374d8175a8981e17f2272690 to your computer and use it in GitHub Desktop.
TypeCasting
#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