As soon as I popped it into Xcode I got ten whole error messages, so let's take it one by one:)
subscription *sub[10];
subscription
is an unknown type name. Did you mean
su
?
sub(string s="subsriber",int n=10){ Sub=s; }
Same problem here - you haven't defined sub as an identifier. I'm going to assume you mean
su
again.
cin >> Subscription;
setSubscription(Subscription);
subscription ob(Subscription,getid());
Subscription
isn't defined.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
do {
if ( answer == 'y' ){
cout << "What is your name ? " <<endl;
cin >> Subscription;
cout << "Your ID is : "<<getid() <<endl;
setSubscription(Subscription);
cout << "Now the member is included in the subscription ofmy pet" <<endl<<endl; subscription ob(Subscription,getid());
for(int i=0;i<10;i++){
sub[i]=&ob;
else
cout << " Thank you, Come again" <<endl;
}
}
cout << "If you want another new subscription press 1, if you're not press 0 " <<endl;
cin >> chose;
} while (chose!=0 );
}
|
This whole area is sort of jumbled up. Your if and for loop are missing closing curly brackets.
Your do while loop also got mixed up. This whole area is sort of a mess really.
if(sub[i]->getSubscription()==nameofSubscription){
sub should be su, but there's multiple errors I'm getting for this line alone.
delete sub[i];
My compiler said to turn it to su::sub, but that just gave me more errors.
I can try my best to help you clean this up, but I'll need your help too since I am kind of confused about what you're trying to do and what's going on. Are you using an IDE or a debugger?