c++ - 嵌套字典语法 ICE C++

标签 c++ syntax dictionary ice

我遇到了 ZeroC ICE 字典语法的新手问题。这是我尝试过的方法,但似乎没有任何效果。

/*What I want to make <flightNo, <hr, month day>>*/
dictionary<int, <short, short>> FlightSchedule;
dictionary<int, dictionary<short, short>> FlightSchedule;

我应该怎么写才符合语法?

最佳答案

在这里我找到了解决方案。

dictionary<short, short> Time;
dictionary<int, Time> FlightSchedule

我想知道是否还有其他解决方案,因为上面的 IMO 语法等于:

dictionary<int, dictionary<short, short>> FS;

关于c++ - 嵌套字典语法 ICE C++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24416399/

相关文章:

.net - 从非托管 C++ 动态加载混合模式 C++/CLI .dll(和依赖项)

python - 为什么在 Python 中调用数字文字上的方法会出现语法错误?

SQL语法错误?

python - 将 NoneType 分配给 Dict

c++ - UPnP,仅设备公告

c++ - 适用于 Linux 的 Eclipse CDT

ruby-on-rails - 更改主要关键问题 Rails 4.0

reactjs - 如何在 React TS 中为对象(Map 数据结构)中的每个项目渲染自定义元素?

python - 按多个键分组并汇总/平均字典列表的多个值

c++ - 使用枚举类定义标志