Seating arrangements

Hi guys, im making an airline reservation system where a user is able to choose a there own seat. But there are two classes, first class and second class. First class can hold seats from 1-5, second class is 6-10.

If a user picks seat number 6 in first class, i want it to tell the user there is an error and that the seating arrangements is 1-5.

I have written the code so far and at the moment, if a user picks a seat higher than 6, it will display the error message but it will also display the message saying "your seat number is; "

I want it to completely say no, you cannot pick this seat, im a beginner programmer and this is an assignment for work, this is the remaining part of the code so once i get this, the rest of my code is simple enough. Heres my code

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include<iostream>
using namespace std;
int f=1,s=6,ans, mainmenu;
bool firstclass [5]= {0};
bool secondclass [5]= {0};
int fspace = 5;
char check,con, position;
int main()
{
mainmenu:
	cout <<"\t--Hello, welcome to AIRLINE RESERVATION--" << endl;
	cout <<"--Please select the following:" << endl;
	cout <<"--[1] For a First-class seat" << endl;
	cout <<"--[2] For a Second-class seat" << endl;
	cout <<"--[3] Quit program.\n\n" << endl;
	do
	{
		cout<<"\tWhich class would you like?" << endl;
		cin>>ans;
		{
			if (ans == 1)
				goto firstClass;
		}
		{
			if (ans == 2)
				goto secondClass;
		}
		if (ans == 1 && f<=5)
		{
firstClass:
			cout << "\t--Welcome to first class--" << endl;
			cout<<"\tPlease choose a seat"<< endl;
			cin >> position;
			f = position - 1;
			if (firstclass [f] == 0) 
			{
				firstclass [f] = 1;
				cout << "Your seat number is: " << position << endl;
			}
			else
			{
				cout << "This seat is already booked" << endl;
			}
			if (f >= fspace)
			{
				cout << "The seating arrangements for this class is 1-5, please pick again." << endl;
			}
			cout<<"\t--Would You Like To Continue? (y/n)--\n";
			cin>>check;
			{
				if (check == 'n')
					goto mainmenu;
			}
		}
		else if (ans == 1 && f>5)
		{
			cout<< "\tUnfortunately, the First class is now full." << endl;
			cout<<"\tDo you want a seat in the Second classs? (y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && s<=10)
			{
secondClass:
				cout<<"Your seat number is "<<s<<".\n";
				s++;
				cout<<"Do you want to continue(y/n)\n";
				cin>>check;
			}
			else if ((con == 'Y' || con =='y') && s>10)
			{
				cout<<"Sorry,all seats are taken!!\n\n";
				cout<<"The next flight leaves in 3 hours;)!\n";
				return 0;
			}
			else if (con != 'y' || con != 'Y')
			{
				cout <<"The next flight leaves in 3 hours!\n";
				return 0;
			}
		}
		if (ans == 2 && s<=10)
		{
			cout<<"Your seat number is "<<s<<".\n\n";
			s++;
			cout<<"Do you want to continue? (y/n)\n";
			cin>>check;
		}
		else if (ans == 2 && s>10)
		{
			cout<<"\t\tSorry, but the second class is now full!\n";
			cout<<"\tWould you like a seat in first class?(y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && f<=5)
			{
				cout<<"Your seat number is "<<f<<".\n";
				cout<<"Do you want to continue?(y/n)\n";
				cin>>check;
			}
			else if ((con == 'Y' || con =='y') && f>5)
			{
				cout<<"Soryy,all seats are taken!!\n\n";
				cout<<"The next flight leaves in 3 hours!\n";
				return 0;
			}
			else if (con != 'y' || con != 'Y')
			{
				cout<<"The next flight leaves in 3 hours!\n";
				return 0;
			}
		}
		else if (ans>3)
		{
			cout<<"Incorrect Input!!\n\n\n";
			cout<<"\n";
			cout<<"\n";
			return main();
		}
	}
	while (check == 'y' || check == 'Y');
	return 0;
}
Last edited on
youre "position" is of type char.
At line 33-34 you do :
1
2
cin >> position;
f = position - 1;

so if the user inserts 5 the result will NOT BE 4 it will be 52

to corect that u need to either parse the char value or change the type of youre position from char to int

Also at line 28 change from
 
if (ans == 1 && f<=5)

to
 
if (ans == 1)




So your code should lock like this :
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#include<iostream>
using namespace std;
int f=1,s=6,ans, mainmenu, position;
bool firstclass [5]= {0};
bool secondclass [5]= {0};
int fspace = 5;
char check,con;
int main()
{
mainmenu:
	cout <<"\t--Hello, welcome to AIRLINE RESERVATION--" << endl;
	cout <<"--Please select the following:" << endl;
	cout <<"--[1] For a First-class seat" << endl;
	cout <<"--[2] For a Second-class seat" << endl;
	cout <<"--[3] Quit program.\n\n" << endl;
	do
	{
		cout<<"\tWhich class would you like?" << endl;
		cin>>ans;
		{
			if (ans == 1)
				goto firstClass;
		}
		{
			if (ans == 2)
				goto secondClass;
		}
		if (ans == 1)
		{
firstClass:
			cout << "\t--Welcome to first class--" << endl;
			cout<<"\tPlease choose a seat"<< endl;
			cin >> position;
			f = position - 1;
			if(f<=5)
			{
				if (firstclass [f] == 0) 
				{
					firstclass [f] = 1;
					cout << "Your seat number is: " << position << endl;
				}
				else
				{
					cout << "This seat is already booked" << endl;
				}
			}
			else if (f > fspace)
			{
				cout << "The seating arrangements for this class is 1-5, please pick again." << endl;
			}
			cout<<"\t--Would You Like To Continue? (y/n)--\n";
			cin>>check;
			{
				if (check == 'n')
					goto mainmenu;
			}
		}
		else if (ans == 1 && f>5)
		{
			cout<< "\tUnfortunately, the First class is now full." << endl;
			cout<<"\tDo you want a seat in the Second classs? (y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && s<=10)
			{
secondClass:
				cout<<"Your seat number is "<<s<<".\n";
				s++;
				cout<<"Do you want to continue(y/n)\n";
				cin>>check;
			}
			else if ((con == 'Y' || con =='y') && s>10)
			{
				cout<<"Sorry,all seats are taken!!\n\n";
				cout<<"The next flight leaves in 3 hours;)!\n";
				return 0;
			}
			else if (con != 'y' || con != 'Y')
			{
				cout <<"The next flight leaves in 3 hours!\n";
				return 0;
			}
		}
		if (ans == 2 && s<=10)
		{
			cout<<"Your seat number is "<<s<<".\n\n";
			s++;
			cout<<"Do you want to continue? (y/n)\n";
			cin>>check;
		}
		else if (ans == 2 && s>10)
		{
			cout<<"\t\tSorry, but the second class is now full!\n";
			cout<<"\tWould you like a seat in first class?(y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && f<=5)
			{
				cout<<"Your seat number is "<<f<<".\n";
				cout<<"Do you want to continue?(y/n)\n";
				cin>>check;
			}
			else if ((con == 'Y' || con =='y') && f>5)
			{
				cout<<"Soryy,all seats are taken!!\n\n";
				cout<<"The next flight leaves in 3 hours!\n";
				return 0;
			}
			else if (con != 'y' || con != 'Y')
			{
				cout<<"The next flight leaves in 3 hours!\n";
				return 0;
			}
		}
		else if (ans>3)
		{
			cout<<"Incorrect Input!!\n\n\n";
			cout<<"\n";
			cout<<"\n";
			return main();
		}
	}
	while (check == 'y' || check == 'Y');
	return 0;
}
Last edited on
Hello, thankyou for the reply.

I have implemented your changes and made alot of other ones, the changed you made helped it stop it from booking seats 6 and above, but now it is blocking any seats being booked, here is my new code
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#include<iostream>
using namespace std;
int f=1,s=6,ans, mainmenu;
bool firstclass [5]= {};
bool secondclass [10]= {};
int fspace = 5;
int sspace = 10;
char check,con, position;
int main()
{
mainmenu:
	cout <<"\t--Hello, welcome to SHARMA AIRLINE RESERVATION--" << endl;
	cout <<"--Please select the following:" << endl;
	cout <<"--[1] For a First-class seat" << endl;
	cout <<"--[2] For a Second-class seat" << endl;
	cout <<"--[3] Quit program.\n\n" << endl;
	do
	{
		cout<<"\tWhich class would you like?" << endl;
		cin>>ans;
		{
			if (ans == 1)
				goto firstClass;
		}
		{
			if (ans == 2)
				goto secondClass;
		}
		//if (ans == 1 && f<=5)
		if (ans ==1)
		{
firstClass:
			cout << "\t--Welcome to first class--" << endl;
			cout<<"\tPlease choose a seat from 1-5"<< endl;
			cin >> position;
			//for (f = 0; f <=fspace; f++)
			f = position - 1;
			//if (firstclass [f] == 0) 
			if (f<=5)
			{
				if (firstclass [f] == 0)
				{
				firstclass [f] = 1;
				cout << "Your seat number is: " << position << endl;
				}
			else
			{
				cout << "This seat is already booked" << endl;
			}
			}
			else if (f > fspace)
			{
				cout << "The seating arrangements for this class is 1-5, please pick again." << endl;
			}
	
			cout<<"\t--Would You Like To Continue? (y/n)--\n";
			cin>>check;
			{
				if (check == 'n')
					goto mainmenu;
			}
		}
		else if (ans == 1 && f>5)
		{
			cout<< "\tUnfortunately, the First class is now full." << endl;
			cout<<"\tDo you want a seat in the Second classs? (y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && s<=10)
			{
secondClass:
				cout << "\t--Welcome to Second class--" << endl;
				cout<<"\tPlease choose a seat from 6-10"<< endl;
				cin >> position;
				for (s = 0; s <=sspace; s++)
				s = position - 1;
				if (secondclass [s] == 0) 
			{
				secondclass [s] = 1;
				cout << "Your seat number is: " << position << endl;
			}
			else
			{
				cout << "This seat is already booked" << endl;
			}
			if (s == sspace)
			{
				cout << "The seating arrangements for this class is 6-10, please pick again." << endl;
			}
			cout<<"\t--Would You Like To Continue? (y/n)--\n";
			cin>>check;
			}
			else if ((con == 'Y' || con =='y') && s>10)
			{
				cout<<"Sorry,all seats are taken!!\n\n";
				cout<<"The next flight leaves in 3 hours;)!\n";
				return 0;
			}
			else if (con != 'y' || con != 'Y')
			{
				cout <<"The next flight leaves in 3 hours!\n";
				return 0;
			}
		}
		else if (ans == 2 && s>10)
		{
			cout<<"\t\tSorry, but the second class is now full!\n";
			cout<<"\tWould you like a seat in first class?(y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && f<=5)
			{
				goto firstClass;
				}
			if ((con == 'Y' || con =='y') && f>5)
			{
				cout<<"Soryy,all seats are taken!!\n\n";
				cout<<"\tWould you like a seat in first class?(y/n)\n";
				cin >> con;
				if ((con == 'Y' || con =='y') && s>=6)
				{
					goto secondClass;
				}
				cout<<"The next flight leaves in 3 hours!\n";
				return 0;
			}
			else if (con != 'y' || con != 'Y')
			{
				cout<<"The next flight leaves in 3 hours!\n";
				return 0;
			}
		}
		else if (ans>3)
		{
			cout<<"Incorrect Input!!\n\n\n";
			cout<<"\n";
			cout<<"\n";
			return main();
		}
	}
	while (check == 'y' || check == 'Y');
	return 0;
}
It is because position is a char and f is an int. 1 in ascii (which is what the char is in) is 49. You need to do this:

f = position - 49;

Do be careful in future when changing from one type to another.
Ok first class is sorted, now to try and do the same to second class, will the same rule apply with the f= position - 49?
Just think of it like this:

integer - char equivalent

0 - 48
1 - 49
2 - 50
3 - 51
4 - 52
5 - 53
6 - 54
7 - 55
8 - 56
9 - 57

So if I have number 9 for example, in ascii, to make an integer equal to it I put:
1
2
char c = 9;
int i = c - 48


Or number 4:
1
2
char c = 4;
int i = c - 48; 


In each case, i will be 9 and 4 respectively.

You need to take away one more than this too, in your particular program, (thus -49), since you were taking one away in the first place. Does this all make sense?


Last edited on
to keep it simple please use function as which will make program more simple and readable

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include<iostream>
using namespace std;
#define MAX_FIRSTPOSTION 5
#define MAX_SECONDPOSTION 10

bool firstclass [5]= {0};
bool secondclass [5]= {0};


int main()
{
		
			MainMenuDisplay();
		cout<<"\tWhich class would you like?" << endl;
		cin>>ans;
		
			if (ans == 1)
				FirstClass( firstclass);
		
		
			if (ans == 2)
				SecondClass( firstclass ) ;
		
		
	return 0;
}

void MainMenuDisplay()
{
	cout <<"\t--Hello, welcome to AIRLINE RESERVATION--" << endl;
	cout <<"--Please select the following:" << endl;
	cout <<"--[1] For a First-class seat" << endl;
	cout <<"--[2] For a Second-class seat" << endl;
	cout <<"--[3] Quit program.\n\n" << endl;

}

void FirstClass( int firstclass[])
{
			char check ; 
			int count = 0 ;
			
			cout << "\t--Welcome to first class--" << endl;
			do
			{
			cout<<"\tPlease choose a seat"<< endl;
			cin >> position;
				if (postion  >= MAX_FIRSTPOSTION)
				{
					cout << "The seating arrangements for this class is 1-5, please pick again." << endl;					 
				}
			}
			while ( postion   >= MAX_FIRSTPOSTION);
			
			
			if (firstclass [position - 1] == 0) 
			{
				firstclass [position - 1] = 1;
				cout << "Your seat number is: " << position << endl;
			}
			else
			{
				cout << "This seat is already booked" << endl;
			}
			
			
			while(count < MAX_FIRSTPOSTION ) 
			{
				if( firstclass[count] == 0)
					break;
					
				count++;

						
			};
			if( count >= MAX_FIRSTPOSTION )
			cout<< "\tUnfortunately, the First class is now full." << endl;
}

void SecondClass( int firstclass[])
{
			char check ; 
			int count = 5 ;
			
			cout << "\t--Welcome to Second class--" << endl;
			do
			{
			cout<<"\tPlease choose a seat"<< endl;
			cin >> position;
				if ( (postion  < MAX_FIRSTPOSTION) && (postion  >= MAX_SECONDPOSTION) )
				{
					cout << "The seating arrangements for this class is 6-10, please pick again." << endl;					 
				}
			}
			while ( (postion  < MAX_FIRSTPOSTION) && (postion  >= MAX_SECONDPOSTION));
			
			
			if (firstclass [position - 1] == 0) 
			{
				firstclass [position - 1] = 1;
				cout << "Your seat number is: " << position << endl;
			}
			else
			{
				cout << "This seat is already booked" << endl;
			}
			
			
			while( (count > MAX_FIRSTPOSTION ) && (count > MAX_SECONDPOSTION)  ) 
			{
				if( firstclass[count] == 0)
					break;
					
				count++;

						
			};
			if( count >= MAX_SECONDPOSTION )
			cout<< "\tUnfortunately, the First class is now full." << endl;
}


you can loop the program ...depends upon the conditions
Last edited on
oh my you completely redesgined my program. For the above program i am geting this error:

(13) : error C3861: 'MainMenuDisplay': identifier not found
(18) : error C3861: 'FirstClass': identifier not found
p(22) : error C3861: 'SecondClass': identifier not found

how to fix this?
Last edited on
I think this program is just getting big and ugly where it does not need to. I would say, get your original program working, ignoring what code bluecoder has written (although he is right you should be using functions!). Then, we can take a look at how to make the program nicer, more compact and readable.
I agree mat, but i just dont understand this ascii thing, and this is for a project at college that im doing and i want the best grade possible, but learning at the same time, ive done a little bit on functions and understand it slightly, not using it was a very silly mistake of mine but looking at bluecoder and seen what he has done it looks so much neater and clearer to read.

If you guys can help me progress from this i will be forever in your debt!

edit: also im not taking bluecoder route because it makes it easier for me as a student, its not the case:P
Last edited on
Some notes for the future:

Basically, use an int where you are dealing ONLY in whole numbers. Use a char ONLY when you are using characters. Don't use a char to represent numbers, if you can simply declare another int to use.

I would also avoid using goto. It's bad practice to use goto.

Is the program working as you expected it to now?
it does't work. It only goes up to 9 seats, when i type in 10 it quits the program. Heres an updated version:

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
int f=0,s=6,ans, mainmenu;
bool firstclass [5]= {};
bool secondclass [11]= {};
int fspace = 5;
int sspace = 11;

char check,con, position;
int main()
{
mainmenu:
	cout <<"\t**WELCOME TO SHARMA AIRLINE RESERVATION**" << endl;
	cout <<"\t----Please select from the following: ----" << endl;
	cout <<"\t----For first classs press : 1----" << endl;
	cout <<"\t----For second class press : 2----" << endl;
	cout <<"\t----To quit the program press : 3----" << endl;
	do
	{
		cout<<"\t----Which class would you like?----" << endl;
		cin>>ans;
		{
			if (ans == 1)
				goto firstClass;
		}
		{
			if (ans == 2)
				goto secondClass;
		}
		//if (ans == 1 && f<=5)
		if (ans ==1)
		{
firstClass:
			cout << "\t--Welcome to first class--" << endl;
			cout<<"\tPlease choose a seat from 1-5"<< endl;
			cin >> position;
			//for (f = 0; f <=fspace; f++)
			f = position - 48;
			//if (firstclass [f] == 0) 
			if (f<=5)
			{
				if (firstclass [f] == 0)
				{
				firstclass [f] = 1;
				cout << "Your seat number is: " << position << endl;
				}
			else
			{
				cout << "This seat is already booked" << endl;
			}
			}
			else if (f > fspace)
			{
				cout << "The seating arrangements for this class is 1-5, please pick again." << endl;
			}
	
			cout<<"\t--Would You Like To Continue? (y/n)--\n";
			cin>>check;
			{
				if (check == 'n')
					goto mainmenu;
			}
		}
		else if (ans == 1 && f>5)
		{
			cout<< "\tUnfortunately, the First class is now full." << endl;
			cout<<"\tDo you want a seat in the Second classs? (y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && s<=10)
			{
secondClass:
				cout << "\t--Welcome to Second class--" << endl;
				cout<<"\tPlease choose a seat from 6-10"<< endl;
				cin >> position;
				//for (s = 0; s <=sspace; s++)
				s = position - 54;
				if (s<10)
				{
				if (secondclass [s] == 0) 
				{
				secondclass [s] = 1;
				cout << "Your seat number is: " << position << endl;
				
				}
			else
			{
				cout << "This seat is already booked" << endl;
			}
				}
			else if (s != sspace)
			{
				cout << "The seating arrangements for this class is 6-5, please pick again." << endl;
			}
			cout<<"\t--Would You Like To Continue? (y/n)--\n";
			cin>>check;
			}
			else if ((con == 'Y' || con =='y') && s>10)
			{
				cout<<"Sorry,all seats are taken!!\n\n";
				cout<<"The next flight leaves in 3 hours;)!\n";
				
			}
			else if (con != 'y' || con != 'Y')
			{
				cout <<"The next flight leaves in 3 hours!\n";
				
			}
		}
		else if (ans == 2 && s>10)
		{
			cout<<"\t\tSorry, but the second class is now full!\n";
			cout<<"\tWould you like a seat in first class?(y/n)\n";
			cin>>con;
			if ((con == 'Y' || con =='y') && f<=5)
			{
				goto firstClass;
				}
			if ((con == 'Y' || con =='y') && f>5)
			{
				cout<<"Soryy,all seats are taken!!\n\n";
				cout<<"\tWould you like a seat in secondclass class?(y/n)\n";
				cin >> con;
				if ((con == 'Y' || con =='y') && s>=6)
				{
					goto secondClass;
				}
				cout<<"The next flight leaves in 3 hours!\n";
				
			}
			else if (con != 'y' || con != 'Y')
			{
				cout<<"The next flight leaves in 3 hours!\n";
				
			}
		}
		else if (ans>3)
		{
			cout<<"Incorrect Input!!\n\n\n";
			cout<<"\n";
			cout<<"\n";
			return main();
		}
	}
	while (check == 'y' || check == 'Y');
	return 0;
}
Last edited on
oh of course. You can't enter in '10' to the char because it will just be a newline character. To make your code work:

Declare a new int called positionint or something like that.

Go to everywhere in your code where 'position' takes an integer and put that new integer there in place.

Then, change your conversions:

s = position - 54

becomes:

s = positionint - 1

Viola, should work.
It is 99% there!!!!!!!!!!

edit: mat is there a email i can contact you on instead? i don't want to seem like im spamming this thread.
Last edited on
Sure: ''matsc @ hotmail . co . uk''

With no quotes or spaces. ;)
Last edited on
You know that you can actually write int i = c - '0'; ¿do you?

¿How hard is to indent code?
Pretty hard when you are a complete beginner whos only been doing this 8 weeks. Then what do i do with c, where do i implement it?
IDEs should do that for you...

Don't use the ASCII code when you could just write the character.
Topic archived. No new replies allowed.