GDB is open:
please share your comments here!
Topic:-
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.
SOLUTION:
Use classes in coding due to the following characteristics.
Structures has only data variables gathered, grouped and named as a single entity, but in classes there are both data members and as well as functions to manipulate data members.
In structures data variables are by default public and are visible to all and every one can change them. But the data members and member functions are by default are private and are not visible to every one. In classed we can make the member functions public to manipulate the data members so these are visible to every one and by making data members private we can hide them. So one cannot change the values wrongly.