I am getting error c2440 in my compiler, but I cannot figure out what causes it.
This is mistake:
Error 2 error C2440: 'initializing' : cannot convert from 'int' to 'System::String ^' c:\users\***.****\documents\visual studio 2005\projects\cpas1\cpas1\Form1.h 1083
and this is the corresponding code:
String *strFilename = 0;
The managed types used in managed C ++ do not use stars (i.e. *), instead, I think they are called tracking descriptors (i.e. ^). Thus, your expression should be written as follows:
String^ strFilename = nullptr;
String *strFilename = "0";
not
System :: String is a managed class. I suppose you should use the nullptr keyword to initialize it.
nullptr