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 ..
All code compiled by traditional C/C++ compilers are Unmanaged Code. COM components, ActiveX interfaces, and Win32 API functions are examples of unmanaged code. Managed code is code written in many high-level programming languages that are available for use with the Microsoft .
Native code is written in the "native" machine language of the computer that it is running on and is executed directly by the processor. Managed code is written in a special language that requires another program to run (i.e. manage) it.
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.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With