Here take a look at this simple class I just coded really quickly for you. This may help you to see some of the mistakes you are making.
Code:
#include <iostream.h>
class Person
{
private:
int age;
float weight;
public:
Person(){};
Person(int x, float w){age = x; weight = w;}
void getData()
{
cout<<"Enter Age:"; cin>>age;
cout<<"Enter Weight:"; cin>>weight;
}
void showData()
{
cout<<"Age:"<<age<<endl;
cout<<"Weight:"<<weight<<endl;
}
};
int main()
{
{
Person Disguised(22,185.5);//call to constructor with arguments
Person Dis_guised; //call to default constructor
Dis_guised.getData();//member function call by object of class
Disguised.showData();//using the dot operator
Dis_guised.showData();
}
return 0;
}