Created
October 11, 2014 07:11
-
-
Save DamonHao/872c660c7d12f8f8dbe0 to your computer and use it in GitHub Desktop.
C++ linux little edian
This file contains hidden or 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
| void test() | |
| { | |
| int a = 0x00002; | |
| char p = ((char*)(&a))[0]; | |
| cout << (int)p << endl; | |
| } | |
| int main() | |
| { | |
| test(); | |
| return 0; | |
| } | |
| /× | |
| output 2 | |
| /× |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment