>" matches these operands diy" />
>" matches these operands diy" />
Enum cin ile kullanımı?
DonanımHaber Mini sürüm 2 Ocak 2026 tarihi itibariyle kullanımdan kalkacaktır. Bunun yerine daha hızlı bir deneyim için DH Android veya DH iOS uygulamalarını kullanabilirsiniz.
person.gender daki cin kısmındaki >> in altı çizili ve no operator ">>" matches these operands diyor
struct Person
{
enum Gender
{
Male,Female
}gender;
int IDNUM;
string Name;
int Age;
int Height;
string Profession;
};
void PersonData (Person &person)
{
Person person;
cout << "Please Enter the following details of the Person: " << endl;
cout << "Name: ";
cin >> person.Name;
cout << "Age: ";
cin >> person.Age;
cout << "Height (in cm): ";
cin >> person.Height;
cout << "Gender: ";
cin >> person.gender; //The Error is on this line. It also persists if I use getline
cout << "Profession: ";
getline (cin,person.Profession);;
}