0:00 / 0:00
- Recommended by 1 person: 1 in engineering communities.
Beginner. No background in the topic needed.
1.3K views6 years ago1 recommendation
Programming languagesCLanguage design and type systems
An explanation of how to define and use structures in C, including a discussion on typedef conventions.
A note on using typedef on structures: _t should not be used. All POSIX structs use that convention, so the reader might confuse the user defined struct to be coming from the standard. Linus Torvalds actually prefers NOT to typedef his structs, and explicitly use the struct keyword as part of the declaration. After the switch keyword, there had to be a space 🤦♂️ Why? switch is a keyword, and not a function call.