What are the differences between a C++ struct and C++ class? July 03, 2009 Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments Achyut said… The only formal difference between class and structure is that in a class the members are private by default, while in a structure they are public by default. It is good to use Structre for data,classes for both datamembers and memberfunctions.
Comments
It is good to use Structre for data,classes for both datamembers and memberfunctions.