Kullanıcıdan Struct Verisi Alma
# Struct'a Veri Girişi
Struct üyeleri kullanıcıdan alınabilir.
Bu işlem kayıt ekranları, müşteri yönetimi ve personel sistemlerinde oldukça sık kullanılır.
Örnek Kod
#include <iostream>
#include <string>
using namespace std;
struct Personel
{
string ad;
int yas;
};
int main()
{
Personel p;
cout << "Ad: ";
getline(cin, p.ad);
cout << "Yas: ";
cin >> p.yas;
cout << p.ad << " " << p.yas;
return 0;
}🎯 Bu Dersteki Görevler
Personel Kaydı
Dil: cpp
Yükleniyor…