Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/153.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 编译卡在上一个编译c++; #包括 #包括 #包括 使用名称空间std; int main(){ cout>a>>b; cout_C++ - Fatal编程技术网

C++ 编译卡在上一个编译c++; #包括 #包括 #包括 使用名称空间std; int main(){ cout>a>>b; cout

C++ 编译卡在上一个编译c++; #包括 #包括 #包括 使用名称空间std; int main(){ cout>a>>b; cout,c++,C++,您正在看到以前程序的结果,因为新程序的编译失败 P>程序编译失败的原因是因为程序依赖于C++标准库的代码。因为使用了< C++ >代码> C++,所以程序不与C++标准库链接。你需要使用 G++< /Cord>这是C++的编译器。< /P>你知道为什么我不能删除EX吗?可执行,它说它在代码中是打开的,这意味着什么?我已经关闭了所有内容。谢谢,它不再显示这些错误了。@Derteckpt可能是因为它仍在运行?请检查操作系统的任务管理器。 #include <iostream>

您正在看到以前程序的结果,因为新程序的编译失败


<> P>程序编译失败的原因是因为程序依赖于C++标准库的代码。因为使用了< C++ >代码> C++,所以程序不与C++标准库链接。你需要使用<代码> G++< /Cord>这是C++的编译器。< /P>你知道为什么我不能删除EX吗?可执行,它说它在代码中是打开的,这意味着什么?我已经关闭了所有内容。谢谢,它不再显示这些错误了。@Derteckpt可能是因为它仍在运行?请检查操作系统的任务管理器。
   #include <iostream>
   #include <fstream>
   #include <string>

   using namespace std;



   int main() {

     cout << "Hello";

   }
  #include <iostream>
  #include <fstream>
  #include <string>

  using namespace std;


  int main() {

      int a, b;
      cin >> a >> b;
      cout << a + b << endl;

      return 0;
  }
     c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: 
     C:\Users\User\AppData\Local\Temp\cctefhtT.o:code.cpp:(.text+0x19): undefined reference to 
     `std::cout'
     c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: 
     C:\Users\User\AppData\Local\Temp\cctefhtT.o:code.cpp:(.text+0x1e): undefined reference to 
     `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> > 
     (std::basic_ostream<char, std::char_traits<char> >&, char const*)'
      c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: 
      C:\Users\User\AppData\Local\Temp\cctefhtT.o:code.cpp:(.text+0x35): undefined reference to 
      `std::ios_base::Init::~Init()'
      c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: 
      C:\Users\User\AppData\Local\Temp\cctefhtT.o:code.cpp:(.text+0x56): undefined reference to 
      `std::ios_base::Init::Init()'
      collect2.exe: error: ld returned 1 exit status