I'm porting some C++ code to MC++ and I have a function that formerly
returned either a valid pointer, or NULL. In MC++, how do I return NULL?
If I try "return NULL;" I get a "cannot convert from 'int' to ..." error.
Thanks,
--Jeremy
Jeremy,
Is nullptr perhaps what you're looking for?
Dave
nullptr is a VC2005 thing that doesn't exist in VC2003.
If the op uses C++/CLI, nullptr will work. With MC++ it won't.
With VC2003 you can use NULL.
e.g. this compiles without problem:
System::String *s = NULL;
OP: What is the function prototype?
--
Kind regards,
Bruno van Dooren
bruno_nos_pa...@hotmail.com
Remove only "_nos_pam"
Hi,
just for future reference: if you use .NET with Visual C++ 2005, you are
using C++/CLI.
with VC2003 it is called 'Managed Extensions for C++', 'Managed C++' or
simply 'MC++'
these are completely incompatible, so if you are searching for information,
be sure to use the correct name or you'll find lots of information that are
of no use to you anymore.
Thanks,
--Jeremy