gpt4 book ai didi

c++ - Corba IDL : default value for struct members

转载 作者:行者123 更新时间:2023-11-30 02:27:39 25 4
gpt4 key购买 nike

是否可以在 CORBA IDL 中为结构成员定义默认值?我们以下面的结构为例:

struct Example
{
boolean test;
};

如果我将此 IDL 编译为 C++,变量“test”将在对象创建后未初始化。我希望它始终设置为 false,直到它被显式切换为 true。

最佳答案

我使用 omniORB 和 VisiBroker 来实现 CORBA。这些 idl 编译器都不支持默认值结构。

关于c++ - Corba IDL : default value for struct members,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41465203/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com