목록2024/05/21 (1)
Minwoo Dev.
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/M3Ni2/btsHvrBY35e/cebuYbwWZfJLfOXCNfFs0K/img.png)
문제 1예제 StablePointPtrArray.cpp의 65, 66행을 다음과 같이 구성할 수 있도록 Point 클래스를 대상으로 연산자 오버로딩을 진행해보자for (int i = 0; i 물론, 실행결과에는 변함이 없도록 연산자를 오버로딩 해야한다. 정답#include #include using namespace std;class Point{private: int xpos, ypos;public: Point(int x = 0, int y = 0) : xpos(x), ypos(y) {} friend ostream &operatorxpos ypos = arrlen) { cout = arrlen) { cout 결과 문..
C++
2024. 5. 21. 09:41