1
I’m starting to study POO now and it’s a bit weird for me. But I’d like to know if I pass some parameter in a method get
, can result in a mistake?
Ex:
class MostraNum
{
private:
int x;
public:
int getRetornaNum(int x)
{
return x;
}
};
int main()
{
MostraNum result;
cout<<result.getRetornaNum(100)<<endl;
return 0;
}
Be more specific. What you expect the program to do?
– Mário Feroldi