简体   繁体   中英

Link error LNK1123 when using Microsoft Visual C++ 2010 Express

Every time I try to build and debug the simple Hello World Code I get an error stating the following:

1>------ Build started: Project: helloworld, Configuration: Debug Win32 ------
1>  test.cpp
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 ==========

And im using this code:

#include <iostream>
using namespace std;
void main() {
cout << "Hello, World!" << endl;
}

and i think its whenever i use Main() , they tell me not to use it or something. help!!!

Try making it int main() and be sure to put return(0); at the end of the main() block.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM