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


Please Help Members By Posting Answers For Below Questions

What is std :: endl?

591


What is the difference between the compiler and the preprocessor?

609


Explain the virtual inheritance in c++.

588


What is the best book for c++ beginners?

566


What's the most powerful programming language?

581






What is the basic of c++?

592


C is to C++ as 1 is to a) What the heck b) 2 c) 10

633


what Is DCS ? what i will get benefit when i did?

1827


List the merits and demerits of declaring a nested class in C++?

599


How do you flush std cout?

558


What is ofstream c++?

581


What is the basic difference between C and C++?

618


Explain what is class definition in c++ ?

594


What are associate containers?

606


What is the two main roles of operating system?

508