What is the difference between class and structure?

Showing Answers 1 - 7 of 7 Answers

Ashutosh

  • Nov 7th, 2005
 

In C++ there is absolutely no difference.

  Was this answer useful?  Yes

zdmytriv

  • Jan 26th, 2008
 

All members and methods of the structure are public but in class you can define visibility and by default it's private.

  Was this answer useful?  Yes

1)class is the advanced and the secured form of structure.
2)Both are the abstract and user defined data types.
3)By default the the behavior of the class contents is private and the structure is public.
4)In C++ the structure is the class with public behavior.
5)In C++ the structure can also inculde the function definition and function declaration.
6)class is the important way to implement the oops concepts.
and much more......................

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions