Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What Are The Differences Between A C++ Struct And C++ Class?

Answer Posted / shalesh kumar

The default member and base-class access specifies are different.

This is one of the commonly misunderstood aspects of C++. Believe it or not, many programmers think that a C++ struct is just like a C struct, while a C++ class has inheritance, access specifies, member functions, overloaded operators, and so on. Actually, the C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base-class inheritance, and a class defaults to the private access specified and private base-class inheritance.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ a good beginners programming language?

1125


Which is most difficult programming language?

1174


What is the difference between malloc, calloc and realloc?

1101


How the keyword struct is different from the keyword class in c++?

1089


What are dynamic type checking?

1096


Are there interfaces in c++?

1067


What character terminates all character array strings a) b) . c) END

1356


How to declare a pointer to an array of integers?

1188


Can circle be called an ellipse?

1138


What is the difference between reference and pointer?

1227


What is iostream in c++ used for?

1081


Why c++ is called oop?

1175


Explain virtual inheritance?

1256


What do you mean by ‘void’ return type?

1104


Please explain class & object in c++?

1151