#include <iostream>


using namespace std;


template <class T>

void swap_t(T &num1, T &num2)

{

T temp = num1;

num1 = num2;

num2 = temp;

}


class Point

{

private:

int xp;

int yp;

public:

Point(int x=0, int y=0 ) :xp(x), yp(y)

{ }

void ShowPosition() const

{

cout << xp << ',' << yp << endl;

}

void swap() 

{

swap_t(xp, yp);

}

};

int main(void)

{

Point pos1 = (10,17);

pos1.ShowPosition();

pos1.swap();

pos1.ShowPosition();


}





결과값인데 이거 원래 이러냐? 왜 초기화안되고 지랄이야