question

hello, i hope u doing well all. I have this question compsition inshilizing by copy constructor ,but i dont know how to compelet it , i mean i wana u r help to complete any thing just to make the compsition inshilizing by copy constructor clear idea for me.
thank u so much cuz u always help me .

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
 #include<iostream>
#include<string>
using namespace std;
class bank{
 int num1;
string name;
public:
bank();
bank(int n,string a){num1=n;
name=a;}
int getnum1(){return num1;}
string getname(){return name="turky";}
 void print(){
cout<<"this is how do "<<getnum1()<<endl;
cout<<"this is the name"<<getname()<<endl;
 }
};
class company{
bank b;
int id;
public:
	company(bank d):b(d){id=46778;}
void print2(){
cout<<"this is  company "<<

 int main()
 {


 

system("pause");
re 
please i need your help , i have exam tomowrrow
savanh wrote:
compsition inshilizing by copy constructor


I have no idea what this means, sorry. Do you mean you want help creating a copy constructor for your class? Please try to use precise language, it helps us understand what your problem is.

If you just want help with copy constructors I'm sure your course book has quite a large resource set for you, a quick google search brings up quite a number of tutorials as well, if you have specific questions this is a great place to ask, but if you have general questions sometimes you'll get much faster access to the data you need by searching other sources.
Last edited on
Topic archived. No new replies allowed.