+ 4
Can we implement all the concepts of OOPS using the keyword struct in c++
2 Respuestas
+ 3
You can follow object oriented programming styles using structs and functions, but there is no enforcement of the implementation. So, in a shared development situation someone could just alter the value of something in the struct.
That said, when programming in a procedural language (as opposed to an object oriented one), keeping your good habits of being careful with your data is a fantastic idea.
+ 2
Yes you can. If I'm not wrong, the only difference between "class" and "struct" is that "class" members and functions are by default private and "struct"'s are public.