Skip to content
0:00 / 0:00

#c#struct#typedef

Structs in C

theteachr

7.5K subscribers • 17 videos on Hallway

YouTube
  • 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.

Why it's here

1 person recommends this

u/mrillusi0nin r/C_Programming • Recommends

A short on structs.