//
// main.cpp
// asd
//
// Created by İsmail Ertuğlu on 23.11.2022.
//
#include <iostream>
#include <string.h>
#include <stdlib.h> // srand and rand
#include <time.h> // time
using namespace std;
struct Ogrenci{
string ad, soyad;
};
int main(){
Ogrenci ogr[100];
string isimler[6] = {"ali","mehmet","ismail","hasan","okan","veli"};
srand(time(NULL));
for(int i = 0 ; i < 100; i++){
int random = rand() % 6;
ogr.ad = isimler[random];
}
for(int i = 0 ; i < 100; i++){
cout<<ogr.ad<<endl;
}
return 0;
}
Şu tarz bir şey sanırım işinizi görür.