Notice
Recent Posts
Recent Comments
목록임시객체 1
LuvSea
임시 객체
임시 객체는 바로 생성되었다가 사라지는 객체를 말하는데, 몇가지 용도로 쓰인다. 다음 소스를 보자. #include class points { public: int x; int y; points(int x, int y) { this->x = x; this->y = y; } }; void Draw(points P) { //점을 찍는다. }; int main() { points P(2, 3); Draw(P); //.... //.... return 0; } #include class points { public: int x; int y; points(int x, int y) { this->x = x; this->y = y; } }; void Draw(points P) { //점을 찍는다. }; int main..
sTudy
2009. 8. 10. 14:21