So, I am beginner. I have this code and a few problems. For better understanding, you will need this code:
struct student
{
    double marks;
    char name[50];
}stud[100],t;
int main()
{
    int i,j,n;
    cout<<"Enter the number of students: ";
    cin>>n;
    cout<<"Enter student info as name , marks\n";
    for(i=0;i<n;i++)
    {
        cin>>stud[i].name;
        cin>>stud[i].marks;
    }
The problem is, instead of this part:
struct student
{
    double marks;
    char name[50];
}stud[100],t;
There should be this part:
struct student
{
    double marks[];
    string name[];
}stud[100],t;
But then I don't know how to enter that data into the program because then the cin >> doesn't work. Task says that when the user enters ' ' (ENTER), the program should finish and show the students print in order.
 
     
     
    