我一直在将rextester用于多种语言,并且它确实非常有效。只是引起一种语言问题,即C ++(clang)
参数如下:-
LanguageChoice: C++ (clang) = 27
程序:
#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
Input: Is empty
CompilerArgs: -Wall -std=c++14 -stdlib=libc++ -O2 -o a.out source_file.cpp
这是我一直点击的URL:
https://rextester.com/rundotnet/api?LanguageChoice=27&Program=#include int main(){std :: cout <<“你好,世界!\ n”;}&Input =&CompilerArgs = -Wall -std = c ++ 14 -stdlib = libc ++ -O2 -o a.out source_file.cpp
回复:{ “警告”:null, “错误”:“编译器参数必须包含'-o a.out'”, “结果”:null, “ Stats”:“编译时间:0秒,绝对服务时间:0秒”, “文件”:null}
请帮助!
答案 0 :(得分:2)
我直接从 rextexter 站点获取了 CompilerArgs 并在包含之后添加了换行符并且链接正常工作: 它看起来像这样:https://rextester.com/rundotnet/api?LanguageChoice=27&Program=%23include%3Ciostream%3E%0Aint%20main()%20%7B%20std::cout%20%3C%3C%20%22Hello,%20world!%5Cn%22;%20%7D&Input=&CompilerArgs=-Wall%20-std%3Dc%2B%2B14%20-stdlib%3Dlibc%2B%2B%20-O2%20-o%20a.out%20source_file.cpp