I am getting error c2440 in my compiler but I cannot figure out what is causing it.
This is the error:
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 relevant code:
String *strFilename = 0;
Managed types, when used in Managed C++, don't use stars (i.e. *), instead I believe they are called tracking handles (i.e. ^). As such your statement should be written like this:
String^ strFilename = nullptr;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With