class inheritence help

first i put user inputs in to a class

i want to put these input into my derived class

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
/////////////////base class//////////////////////
hehehe::hehehe(int& u_,int& v_,int& w_,int& x_,int& y_,int&z_)
{
	u = u_;
	v = v_;
	w = w_;
	x = x_;
	y = y_;
	z = z_;
}
//in main
userinput(a,b,c,d,e,f); //<---- non member
	
hehehe obj(a,b,c,d,e,f);
////////////////////////////////////////////////////////

////////////////////derived//////////////////////
class hehehechild:public hehehe //inheriting all the traits from the mother. this child acts like his mother.
{
	private:
		int z;
	public:
		int diediedie(); //<---- put user input into this function
		int imhere();
		void print();
};
/////////////////////////////////////////////////

/////////////////my idea/////////////////////////////
int diediedie(int,int,int,int,int,int);
int hehehechild::diediedie(int u1,int v1,int w1,int x1,int y1,int z1)
{
    u1 += v1 + w1 + x1 + y1 + z1;

//is this ok?

return z;
}
Last edited on
Topic archived. No new replies allowed.