彼此的两个班级做得对

彼此的两个班级做得对

本文介绍了彼此的两个班级做得对的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

首先我想道歉,如果之前有问过这个问题,但我找不到答案:(。







我需要知道如何将两个类作为变量彼此相对。我知道我必须有前向引用和变量但有人可以告诉我深层复制构造函数,operator =和dereference函数应该在那个例子中应该是什么样的。有时候我会指点一点点。



Todor

Hi every one.
First I want to apologize if that question was asked before but I couldn't find the answer for it :(.



I need to know how can I have two classes as variables in each other. I know I have to have forward reference and the variables to be pointes. But can someone show me how should a deep copy constructor, operator= and dereference function should look like in that instance. Pointers for me a little bit hard sometimes.

Todor

推荐答案



这篇关于彼此的两个班级做得对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 11:01