for my school project i am suppose to make a banking system. It promts user to create as account objects up to ten and then they are inserted into an object array. and later i need to refer to certain object in that array to produce a forecast using referred object , so far this is what i have done
cout << "\nHow many accounts do you wish to crate: \n";
cin >> accounts;
for (int i = 0; i < accounts; i++)
{
cout << "\n>> Enter your details for your Account: " << accCount << " <<" << endl;
newAccounts[i] = EnterAccountDetails();
if (newAccounts[i].accNo == 0)
{
for (int j = i; j < accounts; j++)
{
newAccounts[j] = newAccounts[j + 1];
accounts-=1;
}
break;
}
accCount++;
}
EnterAccountDetails()as you are having to apply some ugly fix afterwards.