Strings between C# and managed C++

  • Thread starter Thread starter Guest
  • Start date Start date
I have to add that I cannot use

using namespace System;

at the top since I'm using

#include <windows>

needed by a third party, unmanaged library.
 
put windows.h in your stdaffx.h and above any using statement
undef SDK macros if necessary
 
Joachim said:
I have to add that I cannot use

using namespace System;

at the top since I'm using

#include <windows>

needed by a third party, unmanaged library.

So put "using namespace System;" further down your program, maybe inside
your own namespace, so it won't conflict with foreign header files.
 
Or just explicitly qualify the type name System::String, depending on how
often you use it.
 
Back
Top