managed code or unmanaged

T

Tony Johansson

Hello!

Is the statements below correct understood.

If I intend to use C++ in VS2005 I can either use managed code which is
C++/CLI which give me the possibility to mix other language such as C# or VB
or use unmanaged code for example using MFC then I can not mix other
language.

Does VC6/MFC use gc?

This language C++/CLI that I think must be used when intended to use managed
code is this language very different from standard C++?

//Tony
 
W

William DePalo [MVP VC++]

Tony Johansson said:
If I intend to use C++ in VS2005 I can either use managed code which is
C++/CLI which give me the possibility to mix other language such as C# or
VB
Yes.

or use unmanaged code for example using MFC then I can
not mix other language.

Yes, that's the normal usage. But note that the managed and unmanaged
platforms can interoperate in a number of of ways.
Does VC6/MFC use gc?
No.

This language C++/CLI that I think must be used when intended to use
managed code
Yes.

is this language very different from standard C++?

I guess "very" is subjective. There are major differences but not so many as
with VB, for example.

Regards,
Will
 
C

Carl Daniel [VC++ MVP]

Tony said:
Hello!

Is the statements below correct understood.

If I intend to use C++ in VS2005 I can either use managed code which
is C++/CLI which give me the possibility to mix other language such
as C# or VB or use unmanaged code for example using MFC then I can
not mix other language.

There are two separate, somewhat independent issues:

1. Which platform you're targeting: native or managed
2. Which language (syntax) you're using: C++/CLI, ISO C++ or ISO C89.
C++/CLI - managed only
ISO C++ - native or managed (or mixture)
ISO C - native only

Supported languages can be mixed on either platform, so for example, you
can use both ISO C++ and C++/CLI to write managed code (but only the C++/CLI
classes will be usable from other .NET languages). In fact, there's nothing
to stop you from having C++/CLI, ISO C++ compiled as managed, ISO C++
compiled as natice and ISO C89 compiled as native all in the same
executable.
Does VC6/MFC use gc?

No. (Not unless you explicitly use a native garbage collector, such as the
Boehm Collector - http://www.hpl.hp.com/personal/Hans_Boehm/gc/).
This language C++/CLI that I think must be used when intended to use
managed code is this language very different from standard C++?

That's a matter of opinion. It's more similar than it is different, I'd
say.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top