views:

129

answers:

3

I am completely new to C++ development and am trying to learn it in Visual Studio. How can I be sure that I am learning only C++ and not the managed extensions? What configuration settings do I need to change? What project types should I stick to? Any other advice?

Side issue:
I have tried turning off Language Extensions under

Project properties -> C/C++ -> Language -> Disable Language Extensions

but this has generated a compiler error:

Error 1 Command line error D8016 : '/Za' and '/clr' command-line options are incompatible

I've no idea what's going on here ..

+7  A: 

The fact that you have /clr switch in there means you're using a .Net project type - you need to choose a "Win32" project type to get a pure C++ project.

Avoid anything calling itself "managed" or "CLR".

RichieHindle
+1  A: 

In brief, all the Win32 C++ projects are native C++.

The ones including CLR in the name are managed C++.

Language extensions are nothing to do with .NET. It is a number of vendor-specific extensions to native C++. (So the effect of disabling language extensions is roughly similar specifying --ansi with the G++ compiler)

/clr is the flag you need to get rid of.

jalf
+1  A: 

So long as you stick to project types under "Win32" node in New Project dialog, you will only be dealing with native code. There's no way to accidentally write some managed code in those projects, unless you go into Project Properties and switch project type to managed.

Pavel Minaev