- #1
Pattielli
- 296
- 0
Can you tell me why the values cout-ed were all ones (1) if I misused the p->getX() and p->getX ?
I don't understand how the compiler will check such statements since there are no errors but only warnings of integral size mismatch instead...
Thank you,
I don't understand how the compiler will check such statements since there are no errors but only warnings of integral size mismatch instead...
Code:
Point *p=new Point(12.0,36.3);
std::cout<<"p(x,y) = ("<<p->getX()<<","<<p->getY()<<")"<<std::endl;
Thank you,