c++ 공부중인 문관데

class 내 int 로 정의한 private 의 자료형을 함수를 통해 double로 바꿀 수 없나요?

저렇게 하면 계속 int type으로 출력되서여

병신같은 질문인거 같긴한대 고졸문돌이라 양해점;


class people

{

private:

int height;

public:

void output()

{

cout <<height;

}

double double_height()

{

height*=2.3;

return height;

}

int main()

{

people p1;

p1.double_height();

p1.output;

return 0;

}