please help new to c++ programming
in this program am trying to input 5 students information and get there output
but i got wired error {illegal structure operation}
please help
#include <iostream.h>
#include <conio.h>
struct student
{
int no;
char name[20];
float degree;
};
void main()
{
student s;
int i;
for (i=0;i<5;i++)
{
cout<<"\nEnter student number: ";
cin>>s.no;
cout<<"\nEnter student name: ";
cin>>s.name;
cout<<"\nEnter student degree: ";
cin>>s.degree;
}
cout<<"\n\nThe elements are: ";
for (i=0;i<5;i++)
cout<<s.name<<" "<<s.name<<" "<<s.degree<<endl;
getch();
}