Records and Other Languages
Records - Other Languages
- Java: You know ...
- C and C++: Records are called structs
- C++:
- Can also use classes for composite types
- Structs and classes are very similar (ie almost identical)
- Fields are default public in structs, default private in classes
- Keyword struct not needed on variable declarations
- Structs can have functions and constructors, like classes
- Should include some other languages