작성
·
254
0
using namespace std;
int main(int argc, const char * argv[]) {
Monster mon1("sanson",position2D(0,0));
cout<<mon1<<endl;
mon1.moveTo(position2D(1,1));
cout<<mon1<<endl;
return 0;
//out << mon.m_name << " " << mon.m_x << " " << mon.m_y << std::endl;
out<<mon.m_name<<" "<<mon.m_location<<std::endl;
return out;
}를 보면 m_location을 출력시키는 거잔항요 location을 출력하면 location의 멤버변수도 출력된다는게 어디있는건가요?