티스토리 뷰

C++

Class and Object in C++

seoca 2018. 11. 6. 06:26


Class and Object in C++


  • Data and functions are created in class and an object is created through a class.
  • How to declare an object is almost the same way which we declare normal variables.
  • Class members are private by default.
  • To allocate memory, a name should be given as an instance



Example code




'C++' 카테고리의 다른 글

Encapsulation (getters and setters) in C++  (0) 2018.11.06
Reference in C++  (0) 2018.11.06
Dynamic Allocation in C++  (0) 2018.11.03
Function Overloading in C++ with example code  (0) 2018.11.03
Call by reference & Call by value with example code  (0) 2018.11.03