#include <iostream.h>
class A {
int no;
protected:
char ch;
public :
void sub(int n, char c);
void output(void);
};
void A::sub(int n, char c)
{
if(!(n%2) ) no = n+1;
if( c>='a' && c <='z') ch = c-32;
else ch=c;
}
void A::output(void)
{
cout << no << '\t'
<<ch << endl;
}
void main(void)
{
A aa;
cout << sizeof(aa) << endl;
aa.sub(2, 'a');
aa.output();
//aa.no=2;
//aa.ch='a';
}
댓글 없음:
댓글 쓰기
국정원의 댓글 공작을 지탄합니다.