Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教关于复制的问题 #22

Open
aaaaalun opened this issue Feb 7, 2020 · 0 comments
Open

请教关于复制的问题 #22

aaaaalun opened this issue Feb 7, 2020 · 0 comments

Comments

@aaaaalun
Copy link

aaaaalun commented Feb 7, 2020

想实现的效果:假设基类ISimple,继承类CSimple,CSimple有其他的定义的成员变量,我想定义一个clone的函数,里面可以直接复制当前CSimple和他的成员变量,在成员变量的复制我无法做到。

  1. 我想直接CSimple* newSimple = new x3::Object(clsid);或者
    x3::Object* newSimple = new x3::Object(clsid);
    CSimple* newSimple(newSimple );可以具体化到一个实现类,这样才便于访问其成员变量。
    先提前谢谢您的回复
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant