Why c++ is called an object oriented programming language?
Have you seen the fundamental concepts of object orientation?
- inheritance
- abstraction
- encapsulation
- polymorphism
- ...
- classes
- instances
- methods
- decoupling
Just compare them to what C++ allows you (taken from here):
[C++] offers classes, which provide the four features commonly present in OO (and some non-OO) languages: abstraction, encapsulation, inheritance, and polymorphism
Because it deals with 'objects", which are basically in memory representations of a data structure and it's associated behaviours.
You should read a tutorial on objects and object-oriented programming languages for more info.
why c++ is called oject oriented programming language?
Because it has virtual functions? By the way, C++ isn't just an Object-Oriented Programming Language.
精彩评论