Question: > 
> **Possible Duplicate:**   
> 
> [What is the difference between Managed C++ and C++/CLI?](https://stackoverflow.com/questions/2443811/what-is-the-difference-between-managed-c-and-c-cli)   
> 
> [What is CLI/C++ exactly? How does it differ to 'normal' c++?](https://stackoverflow.com/questions/6399493/what-is-cli-c-exactly-how-does-it-differ-to-normal-c)
> 
> 
> 

I am in doubt of distinguishing between C++ and C++.NET.

Is that right C++ is unmanaged code and C++.NET is managed code?

I need to program for a project in C++. For better building the GUI, I would prefer to use C++.NET.

I also have another plain C++ library (unmanaged C++ DLL file), will it be possible to use it as a normal DLL library in the C++.NET project?

Answer: 
> 
> Is that right C++ is unmanaged code and C++.NET is managed code.
> 
> 
> 

There's no such thing as "C++.NET". There's C++/CLI, which is basically C++ with Microsoft extensions that allow you to write code targeting the .NET framework. C++/CLI code compiles to CLR bytecode, and runs on a virtual machine just like C#. I'll assume you're actually talking about C++/CLI.

With respect to that, one can say standard C++ is unmanaged and C++/CLI is managed, but that's very much Microsoft terminology. You'll never see the term "unmanaged" used this way when talking about standard C++ unless in comparison with C++/CLI.

Both standard C++ and C++/CLI can be compiled by the same Visual C++ compiler. The former is the default on VC++ compilers, while a compiler switch is needed to make it compile in latter mode.

> 
> I need to program for a project in C++. For better building the GUI, I
>  would prefer to use C++.NET.
> 
> 
> 

You can build GUI programs in C++ just as well as C++/CLI. It's just harder because there isn't a standard library in standard C++ for building GUI like the .NET framework has, but there are lots of projects out there like [Qt](http://qt.nokia.com/products/) and [wxWidgets](http://www.wxwidgets.org/) which provide a C++ GUI framework.

> 
> I also have another plain C++ library (unmanaged C++ dll), will it be
>  possible to use it as a normal dll library in the C++.NET project?
> 
> 
> 

Yes. It might take some extra work to deal with the different standard C++ data types and .NET data types, but you can certainly make it work.
Managed C++ is a now **deprecated** Microsoft set of deviations from C++, including grammatical and syntactic extensions, keywords and attributes, to bring the C++ syntax and language to the .NET Framework. These extensions allowed C++ code to be targeted to the Common Language Runtime (CLR) in the form of managed code as well as continue to interoperate with native code. Managed C++ was not a complete standalone, or full-fledged programming language.

Managed C++

```
#using <mscorlib.dll>
using namespace System;

int main()  {
  Console::WriteLine("Hello, world!");
  return 0;
}

```

Vanilla C++

```
#include <iostream>
using namespace std;

int main()
{
  cout << "Hello, world!";
 return 0;
}

```