예를 들면 다음과 같은 코드를 작성한다고 해보죠.
[code:1]
#include <iostream>
using namespace std;
class Person{
public:
int age;
//public:
void ShowData();
/*
Person () {
cout << "no arg constructor called" << endl;
}
Person (const Person &p) {
cout << "copy constructor called" << endl;
}
Person (int age) {
cout << "arg constructor called" << endl;