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 a tree in c++?

565


Who was the creator of c++?

569


What is buffering in c++?

589


Which software is used to run c++ program?

554


What are mutator methods in c++?

651






How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

565


What is the use of c++ programming language in real life?

569


Explain mutable storage class specifier.

637


Does c++ support multilevel and multiple inheritances?

552


What it is and how it might be called (2 methods).

660


Where is atoi defined?

585


What is using namespace std in c++?

613


What is functions syntax in c++?

625


Why was c++ made?

654


How a new element can be added or pushed in a stack?

585