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

Why the usage of pointers in C++ is not recommended ?

1515


What is the use of endl in c++?

1062


Is c++ a low level language?

1016


Why oops is important?

1190


What are the types of pointer?

1141


Do you know about latest advancements in C++ ?

1335


What are the five basic elements of a c++ program?

1158


Write syntax to define friend functions in C++.

1120


How a modifier is similar to mutator?

1235


What is the difference between object-oriented programming and procedural programming?

1299


What is operators in c++?

1051


What is polymorphism and types?

1158


What is a stack c++?

1051


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

1591


what is data encapsulation in C++?

1121