Created
January 21, 2019 08:34
-
-
Save renaudcerrato/b183ce7cbd92782caa5f1f8f0ffaba8d to your computer and use it in GitHub Desktop.
Zero Length Arrays
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
struct pstring { | |
unsigned length; | |
char content[0]; | |
}; | |
struct pstring my_string = (struct pstring *) malloc(sizeof (struct pstring) + my_length); | |
mystring->length = my_length; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment