Code:
class Class1{
private:
int size;
int x1[40];
public:
void sayit(int size);
void sayit(int size);
void doit();
void writeit();
}; // cs1
void Class1::sayit(int size){
cout <<"\n\n\t Random Numbers\n\n";
}//sayit
void Class1::sayit(int size){
cout <<"\n\n\t Random Numbers\n\n";
}//sayit
void Class1::doit(){
for(int i=0; i<size; i++) x1[i] = random(999);
}//doit
void Class1::writeit(){
cout << "\n\n\t Random Numbers...\n";
for(int i=0; i<size; i++) cout << "\t" << x1[i];
}//writeit
int main(){
clrscr();
randomize();
Class1 c1,c2;
c1.sayit(20); <----- I want the number of random numbers to be this.
c1.doit();
c1.writeit();
getch();
c2.sayit(40); <----- Number of random numbers to be this.
c2.doit();
c2.writeit();
Comment