0

Possible Duplicate:
What are the differences between struct and class in C++

what is the practical difference between class and struct in c++ except the default definition of members to be public (in struct) and private (in class)?

if this is the only difference why do we need both?

Community
  • 1
  • 1
Day_Dreamer
  • 3,142
  • 5
  • 33
  • 60
  • 1
    possible duplicate of [What are the differences between struct and class in C++](http://stackoverflow.com/questions/92859/what-are-the-differences-between-struct-and-class-in-c) See also http://stackoverflow.com/questions/431429/class-vs-struct-for-data-only for links to even more related questions. This has been asked a lot. – CB Bailey Aug 07 '10 at 22:59
  • 1
    ...and base classes of structs are public bases instead of private bases by default but these are the only differences. – CB Bailey Aug 07 '10 at 23:01

0 Answers0