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

问题描述


我正在寻找是否有任何Windows C ++库支持在对象之间共享数据。

I am looking if there is any windows C++ library support to share data between objects.


示例:我有A级和A级基础派生类B,C,D

Example: I have base Class A & derived classes B,C,D


A类


{


};


B级:公共A

Class B : Public A


{


};


C类:公共A

Class C: :Public A


[


};


D类:公共A

Class D : Public A


{


};


对象:


B bObj1,C cObj1,D dObj1

B bObj1, C cObj1, D dObj1


B bObj2,C cObj2,D dObj2

B bObj2, C cObj2, D dObj2


我想共享数据bObj1,cObj1,dObj1对象&在bObj2,cObj2,dObj2对象之间共享不同的数据

I want to share data bObj1,cObj1,dObj1 objects & share different data between bObj2, cObj2, dObj2 objects


有没有办法实现这个目标?

Is there any way to achieve this?

推荐答案

示例:我有基类A&派生类B,C,D

Example: I have base Class A & derived classes B,C,D

A类

{

};

类B:公开A

{

};

C类:公共A

[

};

D类:公开A

{

};

对象:

B bObj1,C cObj1,D dObj1

B bObj1, C cObj1, D dObj1

B bObj2,C cObj2,D dObj2

B bObj2, C cObj2, D dObj2

我想共享数据bObj1,cObj1,dObj1对象&在bObj2,cObj2,dObj2对象之间共享不同的数据

I want to share data bObj1,cObj1,dObj1 objects & share different data between bObj2, cObj2, dObj2 objects

是否有可用的Windows C ++库API支持来实现这一目标?

Is there any windows C++ library API support available to acheive this?


这篇关于C ++问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 17:44