C struct, typedef, enum & union - Tenouk C & C++
C struct, typedef, enum & union - Tenouk C & C++
C struct, typedef, enum & union - Tenouk C & C++
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
STRUCT, TYPEDEF, ENUM & UNIONStructure, Function and Pointers• Passing and returning <strong>struct</strong>ures to functionsmay not be efficient, particularly if the <strong>struct</strong>ureis large.• We can eliminate this excessive datamovement and computer resources usage bypassing pointers to the <strong>struct</strong>ures to thefunction, and access them indirectly through thepointers.• The following example is a modified version ofour previous program which uses pointersinstead of passing entire <strong>struct</strong>ures.www.tenouk.com, © 36/93