Equivalent of "unsafe" in VC++.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I'm looking for the VC++.NET equivalent of "unsafe" instruction.
unsafe is a VC#.NET instruction
Thanks
 
tlemcenvisit said:
I'm looking for the VC++.NET equivalent of "unsafe" instruction.
unsafe is a VC#.NET instruction

You may want to consider posting some more details as to what you want to
do. That said, a pragma will allow you to embed native code in a mostly
managed application

#pragma managed

// "unsafe" code goes here

#pragma unmanaged

Note that using The Managed Extensions for C++ (MC++) (soon to be C++/CLI)
is a specialty in its own right. You may want to consult a good text on the
topic or search MSDN for articles.

Regards,
Will
 
well, there is no equivalent at all, in C++. C++ has a, somewhat,
better implementation of "unsafe".
code below "#pragma unmanaged" pragma in a translation unit becomes
unmanaged (unsafe??). you can write C or C++ code in those regions. to
revert it back to managed state, use #pragma managed. in that case,
code below this pragma will be compiled for CLI.

(William, managed and unmanaged pragmas better swap?)

Ismail
 
ismailp said:
(William, managed and unmanaged pragmas better swap?)

Yes, thank you. I should know not to post before my second cup of coffee in
the morning. :-)

Regards,
Will
 
Back
Top