I’m trying to build a new .NET C++ project from scratch. I am planning to mix managed and unmanaged code in this project.
this forum thread IDataObject : ambiguous symbol error answers a problem I’ve seen multiple times.
Post #4 states ‘Move all ‘using namespace XXXX’ from .h to .cpp’
this looks like a good idea but now in my header files I need to reference parameters from the .NET Framework like
void loadConfigurations(String^ pPathname);
How am I supposed to move using statements in the .cpp file and use the according namespaces in the .h file?
It’s a good idea to always use fully qualified names in header files. Because the
usingstatement affects all following code regardless of#include, putting ausingstatement in a header file affects everybody that might include that header.So you would change your function declaration in your header file to:
where SomeNamespace is the name of the namespace you were
usingpreviously.