0
Why is class not compulsory in c++?
in java class making was compulsory but its not so on c++. has this got anything to do with c++ being pop and java oop?
2 Respuestas
+ 4
hi,
c++ is partially object oriented programming so we can write program without classes and object.
Incase of java which is fully object oriented programming so we can't write program without classes and object.
0
Because C++ is not fully object oriented, its is partially.
Classes are used to define a set of functions all together and all the properties of class are shared by its member functions.
if u do not create a class, u will have t create a funntion again and again and call it repeatedly in the main() function.