/It is not taking name as input.Skipping name and moving on to branch./
void input()
{
char s[1000];
fflush(stdin);
cout<<"Enter the name : ";
cin.getline(s,sizeof(s));
name=new char[strlen(s)+1];
strcpy(name,s);
fflush(stdin);
cout<<"Enter the branch : ";
cin.getline(s,sizeof(s));
branch=new char[strlen(s)+1];
strcpy(branch,s);
fflush(stdin);
cout<<"Enter the roll number : ";
cin>>rollno;
fflush(stdin);
}
/*Code Snippet for taking input of of object array s[i] of class student of which the above method void input() is part of */
for(i=0;i<n;i++)
{
cout<<endl;
s[i].input();
for(j=0;j<m;j++)
{
cout<<endl;
cout<<"For ";
sb[j].out();
cout<<" : "<<endl;
sb[j].input();
}
}