gpt4 book ai didi

c++ - 我可以在运行时绑定(bind)数据类型吗?

转载 作者:行者123 更新时间:2023-11-30 03:48:56 25 4
gpt4 key购买 nike

假设它存在一个命名空间 Foo。

namespace Foo {
T m;
U n;
}

T 和 U 可以是 int、double 或其他内置类型。那么,是否可以在Runtime中判断内置类型呢?

最佳答案

不,C++ 是静态类型的。所有类型在编译时都是已知的,在运行时不能更改。

关于c++ - 我可以在运行时绑定(bind)数据类型吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32898088/

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