0 votes
in C Plus Plus by
Difference between Class and Structure.

1 Answer

0 votes
by
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

Related questions

+1 vote
asked Jul 16, 2019 in C Plus Plus by Indian
0 votes
asked Dec 8, 2022 in Data Structures & Algorithms by Robin
...