我正在和Arduino合作.
我想在C中的字符串后发送Ctrl+ z.我尝试截断^Z但是没有用.那怎么办呢?
我正在尝试在Ubuntu上编译.所以我键入了一个这么小的程序:
#include <iostream>
using namespace std;
int main(){
int cases;
cin>>cases;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
这件事给出了很多错误:
umair@ubuntu:~/cpp$ gcc -Wall -W -Werror 2.cpp -o 1
/tmp/ccU4nAIg.o: In function `main':
2.cpp:(.text+0x10): undefined reference to `std::cin'
2.cpp:(.text+0x15): undefined reference to `std::istream::operator>>(int&)'
/tmp/ccU4nAIg.o: In function `__static_initialization_and_destruction_0(int, int)':
2.cpp:(.text+0x4d): undefined reference to `std::ios_base::Init::Init()'
2.cpp:(.text+0x5c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccU4nAIg.o:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
我可以在"C"中轻松完成.但是我在"C++"中的错误是什么?
这是我的代码:
GPRS.write("Accept: */*");
Run Code Online (Sandbox Code Playgroud)
但Arudino IDE /*作为评论的开头并给出了这个错误:
java.lang.RuntimeException: Missing the */ from the end of a /* comment */
Run Code Online (Sandbox Code Playgroud)
我试着把它放在\前面/*但是没用.怎么摆脱这个?