Hi Gurus, I have an assignment am doing. The user should enter details of 5 students and return results on the screen.I have the code below and its return 1 error. Can someone kindly help me.With regards
#include<iostream>
#include <string>
#include <sstream>
using namespace std;
int main ()
{
typedef struct
{
string name;
int age;
int i;
}
Student;
Student students[5];
for (i = 0 ; i < 5 ; i++)
{
cout << "Enter Name of student " << i+1 << ": " ;
cin >> students.name ;
cout << "Enter age: " ;
cin >> students.age ;
}
cout << students.name << " " << students.age << "yrs" << endl;
return 0;
}