How does copy constructor work?

后端 未结 5 932
感动是毒
感动是毒 2021-01-17 01:12

How does a copy constructor work in c++

Error 1 error C2064: term does not evaluate to a function taking 1 arguments c:\\users\\thuan\\dropbox\\homework\\css

5条回答
  •  清歌不尽
    2021-01-17 01:43

    You are defining the object as a variable and then you are using it like a function. You are trying to construct the object when it's already constructed

    Try

    IntSet object2(9);
    IntSet object1(object2);
    

提交回复
热议问题