What are the differences between a struct and a class in
C++?
Answer Posted / amit patel
Rsn answer is perfect write.Shivani you are wrong.
the visiblity of members default public in structure,
whereas in class its private as all know.
So please don't make myths here.
for the detail answer for explanation read the following link.
http://carcino.gen.nz/tech/cpp/struct_vs_class.php
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
What are arrays c++?
What is meant by const_cast?
What's the hardest coding language?
What is vectorial capacity?
What do you mean by friend class & friend function in c++?
What is a base class?
Write a program in C++ for Fibonacci series
Does c++ vector allocate memory?
Is std :: string immutable?
Why do we use structure in c++?
How do you differentiate between overloading the prefix and postfix increments?
How do you show the declaration of a virtual constructor?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
Can a Structure contain a Pointer to itself?
What are the types of container classes?