Created
September 12, 2013 14:56
-
-
Save antonijn/6538863 to your computer and use it in GitHub Desktop.
struct asdf vs asdf_t
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
// typedef | |
typedef struct | |
{ | |
int x, y, z; | |
} asdf_t; | |
int main(void) | |
{ | |
asdf_t instance; | |
instance.x = 0; | |
return 0; | |
} | |
// vs struct | |
struct asdf | |
{ | |
int x, y, z; | |
}; | |
int main(void) | |
{ | |
struct asdf instance; | |
asdf.x = 0; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment