in C Plus Plus by
Difference between Class and Structure.

▼ Show 1 Answer

0 votes
Structure: In C language, the structure is used to bundle different types of data types together. The variables inside a structure are called the members of the structure. These members are by default public and can be accessed by using the structure name followed by a dot operator and then the member name.

Class: Class is a successor of the Structure. C++ extends the structure definition to include the functions that operate on its members. By default all the members inside the class are private.

Object-Oriented Programming With C++

Classes, Constructors, Destructors
Learn More with Madanswer

Related questions

+1 vote
0 votes
asked Jun 15, 2020 in C Plus Plus by Robindeniel