269,639 views
11 votes
11 votes
C++
Is there any difference between Class and Structure? Prove with the help of example.

User Behzad Pirvali
by
2.5k points

2 Answers

20 votes
20 votes
The class is reference type (it is a pointer and is assigned on the heap), structure and value type (and is allocated on the stack). The difference is important in terms of memory management.
User Arosboro
by
3.6k points
7 votes
7 votes

Answer:

5555

Step-by-step explanation:

User Ixodid
by
3.0k points