class Point
{
public:
Point();
~Point();
void MoveUp() { --x;}
void MoveDown() { x++;}
void MoveLeft() { y++;}
void MoveRight() { y--;}
void canmove(int xp,int yp);
void move(int xp, int yp); //int directionp);
void setpointX(int xp) { x = xp;}
void setpointY(int yp) { y = yp;}
int getpointX( int xp);
int getPointY( int yp);
private:
int y;
int x;
int direction;
};
int main()
{
Point test;
test.move(test.getpointX, test.getPointY); ///////////// 이부분이요!!!!!!!!1
return 0;
}
void Point ::move(int xp, int yp)
{
cout << xp << yp ;
}
int Point ::getpointX(int xp)
{
x=3;
return x;}
int Point ::getPointY (int yp)
{
y =3;
return y;
}
클래스 함수 인자 값으로 private의 x 와 y 값을 받아 오고 싶은데요..
어떠케 받아와야 하죠????????????????
메인에다 클레스 선언 하셨나요?
존나 웃긴소스네.. getpointX 랑 getpointY는 어떻게 호출해도 3 리턴하고, 의미없는 인자를 받고있네