System::String and top level handles???
-
hey folks, I'm trying to build my project and I get the following error message: Error 4 error C3149: 'System::String' : cannot use this type here without a top-level '^' c:\documents and settings\john\my documents\visual studio 2005\projects\rtdispatch\rtdispatch\DBConnection.h 11 Here is the entire file:
#include "StdAfx.h" #include "DBConnection.h" using namespace System; DBConnection::DBConnection(void){} static void DBConnectToDataSource(String connectString){} // This is the culprit static void DBDisconnectFromDataSource(void){}
Whenever I attempt to use a String, I get this error message. Do I need to instantiate an a String object or something. If so this is not what I'm looking for. I'm trying to simpl declare and define a C style char * Any info would be great. Thanks, John -
hey folks, I'm trying to build my project and I get the following error message: Error 4 error C3149: 'System::String' : cannot use this type here without a top-level '^' c:\documents and settings\john\my documents\visual studio 2005\projects\rtdispatch\rtdispatch\DBConnection.h 11 Here is the entire file:
#include "StdAfx.h" #include "DBConnection.h" using namespace System; DBConnection::DBConnection(void){} static void DBConnectToDataSource(String connectString){} // This is the culprit static void DBDisconnectFromDataSource(void){}
Whenever I attempt to use a String, I get this error message. Do I need to instantiate an a String object or something. If so this is not what I'm looking for. I'm trying to simpl declare and define a C style char * Any info would be great. Thanks, JohnSystem::String does not support stack semantics, so you need to use a String^ instead of a String.
-
System::String does not support stack semantics, so you need to use a String^ instead of a String.
Thanks so much Nish, works perfectly now, I appreciate it :-D Thanks, John