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 multimap sorted c++?
what is a reference variable in C++?
What is conditions when using boolean operators?
What is a c++ class?
What is dynamic and static typing?
What is the use of default constructor?
When is the copy constructor called?
how to access grid view row?
What is the difference between equal to (==) and assignment operator (=)?
How is data hiding achieved in c++?
Explain the uses oof nested class?
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
What is string in c++ programming?
Should I learn c++ c?
Why c++ does not have finally?