Created
August 10, 2017 21:29
-
-
Save MatrixManAtYrService/66d0e1ad6c2c5b24ca672df64c5579a4 to your computer and use it in GitHub Desktop.
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
int foo[] = {1,2}; // an array of int | |
char bar[] = "ab"; // an array of char | |
void* baz = foo; // a pointer to the first element of foo | |
cout << *(baz++); // you might think that this would print the second element of foo | |
void* qux = bar; // a pointer to the first element of bar | |
cout << *(qux++); // you might think that this would print the second element of bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment