Created
May 12, 2012 17:45
-
-
Save krofna/2667873 to your computer and use it in GitHub Desktop.
More pointer fun
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 <stdint.h> | |
#include <iostream> | |
struct Data | |
{ | |
int16_t C; | |
int16_t A; | |
int16_t B; | |
}; | |
int main() | |
{ | |
Data d[2]; | |
Data* p = &d[0]; | |
std::cout << p << std::endl; | |
std::cout << ++p << std::endl; | |
std::cout << ++p << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment