class 자동 인라인 함수(inline)
페이지 정보
본문
// private: public:
#include<iostream>
#include<conio.h>
using namespace std;
class A
{
private:
int x;
int y;
int z;
public:
disp() // 자동 인라인 함수 for ,while 등 순화문 사용시 일반 함수로 변함
{ //
x = 50;
cout << "x -> "<< x << endl;
}
};
void main()
{
A st;
st.disp();
getch();
}
#include<iostream>
#include<conio.h>
using namespace std;
class A
{
private:
int x;
int y;
int z;
public:
disp() // 자동 인라인 함수 for ,while 등 순화문 사용시 일반 함수로 변함
{ //
x = 50;
cout << "x -> "<< x << endl;
}
};
void main()
{
A st;
st.disp();
getch();
}
댓글목록
등록된 댓글이 없습니다.