引用: 平凡的世界12 发表于 2018-12-12 08:40
嗨,我有一个例子来转储图像文件并从PNA复制它,ENA的命令非常相似。
FileStream output = new FileStream(filePath,FileMode.Create);
BinaryWriter writer = new BinaryWriter(output);
Hi Ningchen,
Thank you for the help. When I run your code what changes do I probably have to make because it says the following errors. Is there like a separate function named 'Filestream' and 'Binarywriter' that you wrote which it is referrring to? If so can you add that as well? Thanks in advance.
Cheers
Ram
gpibinternew.cpp(136): error C2065: 'FileStream' : undeclared identifier
1>gpibinternew.cpp(136): error C2146: syntax error : missing ';' before identifier 'output'
1>gpibinternew.cpp(136): error C2065: 'output' : undeclared identifier
1>gpibinternew.cpp(136): error C2061: syntax error : identifier 'FileStream'
1>gpibinternew.cpp(137): error C2065: 'BinaryWriter' : undeclared identifier
1>gpibinternew.cpp(138): error C2065: 'string' : undeclared identifier
1>gpibinternew.cpp(138): error C2146: syntax error : missing ';' before identifier 'str6'
1>gpibinternew.cpp(138): error C2065: 'str6' : undeclared identifier
1>gpibinternew.cpp(138): error C2018: unknown character '0x40'
1>gpibinternew.cpp(138): warning C4129: 'h' : unrecognized character escape sequence
1>gpibinternew.cpp(139): error C2065: 'string' : undeclared identifier
1>gpibinternew.cpp(139): error C2146: syntax error : missing ';' before identifier 'str'
1>gpibinternew.cpp(139): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(140): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(140): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(140): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(142): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(142): error C2065: 'str6' : undeclared identifier
1>gpibinternew.cpp(143): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(143): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(143): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(145): error C3861: 'OPC': identifier not found
1>gpibinternew.cpp(147): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(147): error C2065: 'str6' : undeclared identifier
1>gpibinternew.cpp(148): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(148): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(148): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(150): error C2065: 'string' : undeclared identifier
1>gpibinternew.cpp(150): error C2146: syntax error : missing ';' before identifier 'str5'
1>gpibinternew.cpp(150): error C2065: 'str5' : undeclared identifier
1>gpibinternew.cpp(150): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(150): error C2228: left of '.IO' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(150): error C2228: left of '.ReadString' must have class/struct/union
1>gpibinternew.cpp(151): error C2065: 'Convert' : undeclared identifier
1>gpibinternew.cpp(151): error C2228: left of '.ToInt32' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(151): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(151): error C2228: left of '.IO' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(151): error C2228: left of '.ReadString' must have class/struct/union
1>gpibinternew.cpp(152): error C2065: 'Convert' : undeclared identifier
1>gpibinternew.cpp(152): error C2228: left of '.ToInt32' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(152): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(152): error C2228: left of '.IO' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(152): error C2228: left of '.ReadString' must have class/struct/union
1>gpibinternew.cpp(153): error C2065: 'byte' : undeclared identifier
1>gpibinternew.cpp(153): error C2059: syntax error : ']'
1>gpibinternew.cpp(154): error C2065: 'buffer' : undeclared identifier
1>gpibinternew.cpp(154): error C2065: 'byte' : undeclared identifier
1>gpibinternew.cpp(154): error C2059: syntax error : ']'
1>gpibinternew.cpp(155): error C2065: 'writer' : undeclared identifier
1>gpibinternew.cpp(155): error C2228: left of '.Write' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(155): error C2065: 'buffer' : undeclared identifier
1>gpibinternew.cpp(156): error C2065: 'writer' : undeclared identifier
1>gpibinternew.cpp(156): error C2228: left of '.Close' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(157): error C2065: 'output' : undeclared identifier
1>gpibinternew.cpp(157): error C2228: left of '.Close' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(158): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(159): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(159): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(159): error C2065: 'str' : undeclared identifier
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
引用: 平凡的世界12 发表于 2018-12-12 08:40
嗨,我有一个例子来转储图像文件并从PNA复制它,ENA的命令非常相似。
FileStream output = new FileStream(filePath,FileMode.Create);
BinaryWriter writer = new BinaryWriter(output);
Hi Ningchen,
Thank you for the help. When I run your code what changes do I probably have to make because it says the following errors. Is there like a separate function named 'Filestream' and 'Binarywriter' that you wrote which it is referrring to? If so can you add that as well? Thanks in advance.
Cheers
Ram
gpibinternew.cpp(136): error C2065: 'FileStream' : undeclared identifier
1>gpibinternew.cpp(136): error C2146: syntax error : missing ';' before identifier 'output'
1>gpibinternew.cpp(136): error C2065: 'output' : undeclared identifier
1>gpibinternew.cpp(136): error C2061: syntax error : identifier 'FileStream'
1>gpibinternew.cpp(137): error C2065: 'BinaryWriter' : undeclared identifier
1>gpibinternew.cpp(138): error C2065: 'string' : undeclared identifier
1>gpibinternew.cpp(138): error C2146: syntax error : missing ';' before identifier 'str6'
1>gpibinternew.cpp(138): error C2065: 'str6' : undeclared identifier
1>gpibinternew.cpp(138): error C2018: unknown character '0x40'
1>gpibinternew.cpp(138): warning C4129: 'h' : unrecognized character escape sequence
1>gpibinternew.cpp(139): error C2065: 'string' : undeclared identifier
1>gpibinternew.cpp(139): error C2146: syntax error : missing ';' before identifier 'str'
1>gpibinternew.cpp(139): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(140): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(140): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(140): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(142): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(142): error C2065: 'str6' : undeclared identifier
1>gpibinternew.cpp(143): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(143): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(143): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(145): error C3861: 'OPC': identifier not found
1>gpibinternew.cpp(147): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(147): error C2065: 'str6' : undeclared identifier
1>gpibinternew.cpp(148): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(148): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(148): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(150): error C2065: 'string' : undeclared identifier
1>gpibinternew.cpp(150): error C2146: syntax error : missing ';' before identifier 'str5'
1>gpibinternew.cpp(150): error C2065: 'str5' : undeclared identifier
1>gpibinternew.cpp(150): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(150): error C2228: left of '.IO' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(150): error C2228: left of '.ReadString' must have class/struct/union
1>gpibinternew.cpp(151): error C2065: 'Convert' : undeclared identifier
1>gpibinternew.cpp(151): error C2228: left of '.ToInt32' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(151): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(151): error C2228: left of '.IO' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(151): error C2228: left of '.ReadString' must have class/struct/union
1>gpibinternew.cpp(152): error C2065: 'Convert' : undeclared identifier
1>gpibinternew.cpp(152): error C2228: left of '.ToInt32' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(152): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(152): error C2228: left of '.IO' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(152): error C2228: left of '.ReadString' must have class/struct/union
1>gpibinternew.cpp(153): error C2065: 'byte' : undeclared identifier
1>gpibinternew.cpp(153): error C2059: syntax error : ']'
1>gpibinternew.cpp(154): error C2065: 'buffer' : undeclared identifier
1>gpibinternew.cpp(154): error C2065: 'byte' : undeclared identifier
1>gpibinternew.cpp(154): error C2059: syntax error : ']'
1>gpibinternew.cpp(155): error C2065: 'writer' : undeclared identifier
1>gpibinternew.cpp(155): error C2228: left of '.Write' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(155): error C2065: 'buffer' : undeclared identifier
1>gpibinternew.cpp(156): error C2065: 'writer' : undeclared identifier
1>gpibinternew.cpp(156): error C2228: left of '.Close' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(157): error C2065: 'output' : undeclared identifier
1>gpibinternew.cpp(157): error C2228: left of '.Close' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(158): error C2065: 'str' : undeclared identifier
1>gpibinternew.cpp(159): error C2065: 'ioDmm' : undeclared identifier
1>gpibinternew.cpp(159): error C2228: left of '.WriteString' must have class/struct/union
1> type is ''unknown-type''
1>gpibinternew.cpp(159): error C2065: 'str' : undeclared identifier
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
举报