0
If structure can be use, then why there're classes in cpp?
Just Wanna know.
3 Answers
+ 1
structures are a feature C++ took over from C to maintain comparability. classes are a new feature added in C++ to extend the functionality of structures for better OOP.
0
In common way you can use structures the same way as classes, with methods, data encapsulates polymorphysm. BUT structure is feature of C language, and it is more correct in term of visual representation estetic, view that use class.