Visual C++ Compile Error

Every time I try to compile this very very simple code
1
2
3
4
5
6
7
8
9
#include <iostream>
using namespace std;

int main()
{
    cout << "Hello World!" << endl;

    return 0;
}

Into visual c++ express I get an error saying "1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt" I don't understand why it does this, I followed a tutorial correctly but it still didn't work. I put this into code blocks, it works fine.
I'm not a beginner FYI.
Try to create another project using Visual Studio default generated code. Does it "works" ?

If not, it is something wrong with your VS instalation, please reinstall it.
Yeah, modoran is right. Your code is fine. Te problem is in your projects settings, or the compiler itself, try what he said :)
Topic archived. No new replies allowed.