Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的数据类型可以是 U1、U2、U4、I1、I2、I4std::string或bool.
std::string
bool
假设数据存储在std::vector.
std::vector
如何通过值检查数据类型?
据我所知,tryParse()C#中有。我怎么能在 C++ 中做到这一点?
tryParse()
Value = MyVec[0]; // the value is 65;
我想验证65是否属于 U2 类型?
65