please help me

hello, i hope you all doing well.i have this part of code but when i try to choose 2 then get to per then go inside loop dosent let me put the date when i put 0 and even the commant too , please help me with it !

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class bor:public ani {
 subscript sub ;
public:
void bor()
{
int ch;
cout << "\n\nChoose your Subscription : " << endl;
cout << " 1.premium "<<endl;
cout << " 2.basic "<<endl;
cout << " 3.Log in to a new Subscription " <<endl;
cin >> ch;
switch(ch)
{
case 1: pre();
break;
case 2: bas();
break;
case 3: sub.add_Subscription();
break;
}

void pre(){
string name;
int chose;
string comm;
int day,month,year;
int arrynormal[3];
cout << "Welcome to premium Subscription system \n please enter the name of your animal : " <<endl;
cin >> name; 
sub.setSubscription(name);
cout << "Dear : "<<sub.getSubscription()<<endl;
do {
cout << "If you want borrow an animal press 1, if you are not press 0 " <<endl;
cin>>chose;
switch (chose) {
case 0: cout<< "Thank you Dear " <<endl;
break;
case 1:
for ( int i=0; i<3; ){
					
{cout << "Enter the ID of the Animal you want to borrow : " <<endl;
cin >> arrynormal[i];
}
cout << "If you want onther animal press 1, if you are not press 0 " <<endl;
cin >> chose;
if ( chose==1 )
i++;
else
break;
}
				
{cout<<"pleas enter the date should be (DD/MM/YYYY):"<<endl;
cin>>day>>month>>year;
cout<<"enter the comment:"<<endl;
cin>>comm;
cout<<" If you want print you informaion press 1, if you are not press 0"<<endl;
if ( chose==1 ){
for ( int i=0; i<3; ){
{cout<<"the animal:"<< arrynormal[i];
cout<<"the date:"<<day<<"/"<<month<<"/"<<year<<endl;
} 
}else 
break;
}
}
}while( chose!=0 );
}
please need your help friends
Please use proper indention:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class bor:public ani {
    subscript sub ;
public:
    void bor()
    {
	int ch;
	cout << "\n\nChoose your Subscription : " << endl;
	cout << " 1.premium "<<endl;
	cout << " 2.basic "<<endl;
	cout << " 3.Log in to a new Subscription " <<endl;
	cin >> ch;
	switch(ch)
	{
	case 1: pre();
	    break;
	case 2: bas();
	    break;
	case 3: sub.add_Subscription();
	    break;
	}
	
	void pre(){
	    string name;
	    int chose;
	    string comm;
	    int day,month,year;
	    int arrynormal[3];
	    cout << "Welcome to premium Subscription system \n please enter the name of your animal : " <<endl;
	    cin >> name; 
	    sub.setSubscription(name);
	    cout << "Dear : "<<sub.getSubscription()<<endl;
	    do {
		cout << "If you want borrow an animal press 1, if you are not press 0 " <<endl;
		cin>>chose;
		switch (chose) 
		{
		case 0: cout<< "Thank you Dear " <<endl;
		    break;
		case 1:
		    for ( int i=0; i<3; ){
			
			{cout << "Enter the ID of the Animal you want to borrow : " <<endl;
			    cin >> arrynormal[i];
			}
			cout << "If you want onther animal press 1, if you are not press 0 " <<endl;
			cin >> chose;
	  		if ( chose==1 )
	  		    i++;
			else
			    break;
		    }
		    
		{
		    cout<<"pleas enter the date should be (DD/MM/YYYY):"<<endl;
		    cin>>day>>month>>year;
		    cout<<"enter the comment:"<<endl;
		    cin>>comm;
		    cout<<" If you want print you informaion press 1, if you are not press 0"<<endl;
		    if ( chose==1 ){
			for ( int i=0; i<3; ){
			    {cout<<"the animal:"<< arrynormal[i];
				cout<<"the date:"<<day<<"/"<<month<<"/"<<year<<endl;
			    } 
			}else 
			break;
		    }
		}
		}while( chose!=0 );
	    }
How does this even compile?
there is no main-function and you only posted part of your code.
Furthermore: that function stops in the middle of nowhere :o
Topic archived. No new replies allowed.