You are here:

C++/still on the struct and class problems

Advertisement


Question
Hi,

ok, i will try to write the functions and let u see them, now i get to understand something totally different from what i know. so, is there any major difference(s) then, between a class and struct in c++?

Answer
There is no difference at all except for the default access specifier.

Members of a struct are public if you do not have an access specifier, and inheritance from a struct is public inheritance you do not have an access specifier.
For a class the default is private.  

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


vijayan

Expertise

my primary areas of interest are generic and template metaprogramming, STL, algorithms, design patterns and c++11. i would not answer questions about gui and web programming.

Experience

about 15 years or so

Education/Credentials
post graduate engineer

©2016 About.com. All rights reserved.