发现一个或多个致命错误 [英] Fatal error one or multiple define found

查看:142
本文介绍了发现一个或多个致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我的代码仍然遇到问题,我无法对其进行编译,它不断告诉我我有两个错误:1是isFatal错误,它表示已找到一个或多个定义,第二个是,LNK2005_main已在ex1.obj <中定义br/>
请帮助我确定此代码中的错误:

Hello everybody

I am still facing problem with my code, I cant compile it, it keeps telling me that i have two errors: 1 isFatal error saying that , one or multiple define found and the second one is,LNK2005_main is already defined in ex1.obj

please help me identify the error made in this code :

#include <iostream>

int main ()
{
  std::cout << "Hello there. \n";
  std::cout << "here is 5: " << 5 <<"\n";
  std::cout << "The manipulator endl writes a new line to the screen.";
  std::cout <<endl;
  std::cout <<"Here is a very big number :\t" << 70000 << std::endl;
  std::cout <<"Here is the sum of 8 and 5:\t" << 8+5 << std::endl;
  std::cout <<"Here is a fraction :\t\t" << (float) 5/8 << std::endl;
  std::cout <<"And a very very big number :\t";
  std::cout << (double) 7000*7000 <<std::endl;
  std::cout <<"dont forget to replace Francois Bitas with your name\n";
  getchar();
  return 0;
}



我需要你的帮助;预先感谢.



I need your help; Thanks in advance.

推荐答案

#include < iostream >



并清理输出文件夹(通常是Debug/Release).



and clean the output folder (usually Debug / Release).


这是您的全部源代码吗?您的项目中是否有任何具有另一个主要功能的源文件?

您只能有一个主要功能!
Is this all your source code is? Do you have any source files in your project which has another main function?

You can only have one main function!


这篇关于发现一个或多个致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆