c++ - 与c++编译文件相关的错误

标签 c++ visual-c++

当我尝试运行以下代码时

#include<iostream>
using namespace std;
 class Rectangle
 {
 public:
     int x,y;
     Rectangle(int a,int b)
     {
          x=a;
          y=b;
     }

      int area()
      {
           return x*y;

      }


 };


int main()
{

    Rectangle a(3,4);
    cout<<a.area()<<"  "<<endl;


     return 0;
}

我收到此错误

1>------ Build started: Project: project_class, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

请帮我澄清这个错误的原因

最佳答案

关于c++ - 与c++编译文件相关的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18834019/

相关文章:

c++ - 无法生成 gRPC 服务类

c++ - 在异常对象上调用 std::move 是否正确?

C++ 输出到 .CSV 文件

c++ - 分解在 Visual C++ 中不起作用的函数

c++ - 这在 Visual Studio 中被视为 .NET 还是 IL?

c++二进制搜索返回(找到)无论用户类型如何

windows - 打开闪存驱动器的句柄给我一个 "Access Denied"错误代码

c++ - Visual C++ 做深拷贝的好方法?

visual-studio-2010 - nmake/VC++ 2010 : Compile without MSVCR100. dll 依赖

c++ - 错误 LNK2020 : unresolved token (06000002) in Visual C++