Compile error: "attribute not allowed"

-1

I'm having trouble compiling a program in Visual C ++ and since I'm a beginner, I can not find where the error is.

The program is running perfectly on CodeBlocks. What could be the problem?

The error report follows:

    
asked by anonymous 20.11.2015 / 15:54

1 answer

1

The problem is that you are using the C ++ / CLI compiler which is a managed language that uses .Net. This is not the C ++ language you expect, it's another. You need to configure Visual Studio to use the default C ++.

You must have chosen the wrong project template. See how it should be under documentation .

For example, did you put this STAThreadAttribute ? Is it in the code that is running in CodeBlocks? If not, get out of there.

    
20.11.2015 / 16:27