+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)+ Click Here to Search (Looking For something at vustudents.ning.com?) + Click Here To Join (Our facebook study Group)
I use structures only when I need to hold some data without any member functions associated to it (to operate on the member data) and to access the data variables directly.
1. Reading/Writing data from files and socket streams etc.
2. Passing function arguments in a structure where the function arguments are too many and function syntax looks too lengthy.
Technically there is no big difference between classes and strutures except default accessibility. More over it depends on programming style how we use it.
Structures and Classes are very important data structures used in C / C++. You as a programmer has a choice to use any of them as Structures and Classes do provide features some what similar but only with some differences. Now you are given a task to code either using Structures or Classes. Please give your justification in favor or against of any one you will use for coding.
Your opinion should be concrete with justification in 5 -7 lines only.
While giving your opinion in favor or against don’t write detailed pages or paragraphs as it is discourage your answer should be to the point.
Classes are better then the Structures because we can also write the pvt data in it, So by using classes we can hide over data, which I don’t want to share any body. Every thing decleared inside the structure is Public. Classes consist of and are composed from structural and also behavioral constituents. only use structs for POD types, and for add any methods at all, use classes. Use a struct instead of a class is when declaring a functor right before using it in a function call and want to minimize syntax for the sake of clarity.