Which of the following is not a difference between a class and a struct?

Advertisement

  • Because structs are part of the C programming language, there are some complexity between C and C++ structs. This is not the case with classes.
  • Classes may have member functions; structs are private.
  • The default access specifier for members of struct is public, whereas for member of class, it is private.
  • Template type parameters can be declared with classes, but not with the struct keyword.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment

Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend