다음 프로그램을 실행하면 에러가 발생한다. 에러가 발생하지 않도록 수정하시오
#include<iostream>
using namespace std;
class CRect{
int left;
int top;
int right;
int bottom;
public:
void print();
};
void CRect::print()
{
cout<<"("<<left<<","<<top<<","<<right<<","<<
bottom<<")"<<endl;
}
void main()
{
CRect rc;
rc.left=0;
rc.top=0;
rc.right=20;
rc.bottom='20';
rc.print();
}
크라쓰는 인캡슐레이션
public
메인함수에서에프트 탑 라이트 바텀 직접접근해서그런거아냐?