struct
Saw a cool way to initialize structs in C yesterday:
struct employee {
char *name;
char *surname;
int age;
};
struct employee emp = {
.name = "John",
.surname = "Smith",
.age = 20
};
Invaluable when initializing large structures, where it is very easy to forget the correct order. Much more clear too.
I seriously need
(
Read more... )