this is my code
#include <iostream>
#include <string>
using namespace std;
class Hamoud{
private:
char name[50];
int yearbirthday;
public:
float tall;
int age;
void Getnameandyear(string name)
{
std::array<char, 50> ;
cout<<"enter your name: ";
getline(nama);
int year;
year = yearbirthday;
cout<<"enter your name: ";
getchar(name);
cout<<"Enter your year of birth";
cin>>year;
}
void display()
{
cout<<"your name is: "<<name;
cout<<"your year of birth is : "<<year;
}
};
int main ()
{
Hamoud info;
cout<<"enter your tall ";
cin>>info.tall;
cout<<"your tall is : "<<info.tall;
cout<<"enter your age: ";
cin>>info.age;
cout<<"your age is: "<<info.age;
info.Getnameandyear();
info.display();
}
but i got errors in the function getnameandyear also in display function as well... i know that to access the private members of the class we have to create a function in public that will help us on access then indirectly.... However, I'm getting stuck on the last few steps.. Any idea of how to solve this problem ??