What, if any, are the differences between using class or struct
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:7| Question number:17
All Answers
total answers (1)
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:7| Question number:17
total answers (1)
The only difference between
`struct`
and`class`
is the default access level. The members defined before the first access specifier are`public`
in`struct`
, while those are`private`
in`class`
.