gpt4 book ai didi

.net - 视觉 C++ 2005 'Ports' : is not a member of 'System::IO'

转载 作者:行者123 更新时间:2023-12-01 13:48:16 25 4
gpt4 key购买 nike

我正在尝试将 SerialPort 与 Microsoft Visual Studio 2005、.Net Framework 2 安装一起使用,但我无法编译下面的简单示例:

using namespace System::IO::Ports;
SetParameters(1, 9600, 8, System::IO::Ports::Parity::Even, 300);

因为“Ports”: 不是“System::IO”的成员,所以我激活了通用语言运行时支持 (/clr)。

最佳答案

只需在源代码中添加#using

关于.net - 视觉 C++ 2005 'Ports' : is not a member of 'System::IO' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34062286/

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