------------------------------------------------------------------------------
MC logo
Structs and Classes
[^] CSc 220 Home
------------------------------------------------------------------------------
[Introduction] [Boolean and Control] [Functions] [Arrays and Pointers] [Dynamic Arrays] [Array Errors] [Command Array] [Standard Containers] [Structs and Classes] [Automatic Pointer] [Multi-File Programs] [Copying Objects] [Templates] [Inheritance] [Plain C I/O] [Type Odds And Ends] [Plain C Strings] [File I/O]
[Plain Structs] [Point With Struct] [C++ Point Class] [Linked List (Structs)] [Linked List (Classes)] [C++ v. Java Classes I] [Prime Generator Algorithm] [Fast Primes Generator]
Reading: Pp. 179–181; Ch.13; Ch. 18

A struct is a plain C built-in data structure containing arbitrary data fields. Structs contain only data, no operations. C++ extends structs by allowing them to contain functions. These are called member functions in C++, but they're simply methods in OO terminology.