What are the differences between a struct and a class in
C++?
Answer Posted / rsn
Hello Shivani,
I think both struct and class in C++ are quite the same
except for the fact that, members in struct are public by
default whereas they are private for class.
Moreover struct also supports inheritance,polymorphism
etc...etc...
| Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
Is it possible to write a c++ template to check for a function's existence?
What is function prototyping?
What is a dll entry point?
Is set c++?
Why do we use structure in c++?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
What are the advantages of using friend classes?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
Is c++ low level?
Is c++ vector a linked list?
What problems might the following macro bring to the application?
Which software is best for coding?
What is conditions when using boolean operators?
When should we use multiple inheritance?
What is the use of dot in c++?