|
|
string name[20];
string name;
getline(cin, inputdetails[i].name[19]);
cout << inputdetails[i].name // ...
|
|
string name;
. The name of an array, in your example, name, is actually the address of the first element of the array. so in your code:cout << inputdetails[i].name