Skip to content

Instantly share code, notes, and snippets.

@koraa
Last active December 20, 2015 02:39
Show Gist options
  • Save koraa/6057756 to your computer and use it in GitHub Desktop.
Save koraa/6057756 to your computer and use it in GitHub Desktop.
Typedef Maniacs
// Problem:
// * Name und typ sind auf head und bottom aufgeteilt
// * Es werden zwei typen declariert
//
struct a_ {
int a;
char b;
double c[17];
};
typedef struct a_ A;
// Problem:
// * Name und typ sind auf head und bottom aufgeteilt
// * zwei instruktionen (typedef und struct) in einem statement
//
typedef struct {
int a;
char b;
double c[17];
} B;
// (Favourit)
// Problem:
// * Zwei typen weden declariert
// => überbenutzung von '_' damit niemand auf die idee kommt das struct direkt zu benutzen
typedef struct a__ A;
struct a__ {
int a;
char b;
double c[17];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment