int c=0;
for(int i = c ; i < 11 ;)
{
cout<<"Please enter the name of the player no."<<i+1<<endl;
cin>>arr[i].name;
cout<<"Now please enter the nationality of "<<arr[i].name<<endl;
cin>>arr[i].nationality;
cout<<"Now please enter the height of "<<arr[i].name<<endl;
cin>>arr[i].height;
cout<<"Now please enter the weight of "<<arr[i].name<<endl;
cin>>arr[i].weight;
cout<<"Player is successfully added"<<endl<<endl;
c++;
}
cout<<"You exceed the number of your products"<<endl<<endl;
i want to know how to use input/output files to save these data in txt file
and be able to view it again using another for loop
when i used this code within the for loop it saves only the last entered player's info
how can i make it saves all of them !?