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.
Well... C++ .NET is kind of a misnomer. 
You can program in C++ using visual studio .NET. Well that's what it was called along time ago. Now a days folks just call it Visual Studio, with the dot NET moniker. Well, at least the splash screen doesn't have a big ol .NET in the logo anymore.

It is kind of understood that using Visual Studio (VS), you can program in managed and unmanaged languages (Lots of choices there btw). 

If you want to program in C++ using Visual Studio you have two choices:

1. Unmanaged or native C/C++. This is the old (or new I guess too) C++
that you have always known, and you program with unmanaged memory.
2. Managed C++. They call this C++/CLI. That is read C++ over CLI, not
C++ divided by CLI! This is C++ that has extra keywords, and a few
extra syntax elements than the native C++. This allows you to
utilize the .NET Foundation Class Library and do other fun things in
the .NET framework. This of course uses the garbage collector for
memory for managed types.

Personally my favorite language is C#, but if you need to interop between C++ and .NET than definitely use Managed C++. It is very easy to do, and I think is easier than that other P/Invoke stuff.

If you are going to some project, I would suggest you do your UI in C# and take advantage of all that it has to offer. Then have that reference a mixed mode managed library that contains your C++ code. I think that will be a lot easier for you.

The answer to your last question is yes, you can definitely use that in your app.

Here is how the dependencies would work:

[C# App/GUI] depends on [Managed C++ assembly] depends on [Native C++ Lib]