any suggestions?

so this is all in my header:
the class:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class PCB{
	private:
		int d, p, c;
		int number, location, size;
		string filename;
		char function;
		int *tail;
		int *head;	
	public:
                void sys_gen();
		void arrival();
		void terminate();
		void cdrw_arrival();
};


in my sys_gen() function I have:
1
2
3
4
5
6
cout<<"Please enter the number of CD/RW drives: ";
cin >>c;
while (c < 0 || c >= 10){
   cout<<"Positive integers <max 9> only, please!: ";
   cin >> c;
}


and in my cdrw_arrival() function I have:
1
2
3
4
5
 cin>>number;
       	if (number > c || number < 1){
            cout<<"Wrong Command! Please Try Again!! "<<endl<<endl;
            return;
       }


but I get error that c is not declared in the sys_gen() function
Last edited on
Topic archived. No new replies allowed.