In C, the struct keyword defined a record similar to the record of Pascal and BASIC; however, in C++ a struct is much like a class only by default all members are public instead of private.