J
joye
Hello ,
I meet some data convertion problem, the sample code as following,
namespace Configure
{
using namespace System ;
typedef struct _SW{
char szVersion[64] ;
} SW,*PSW ;
public __gc class Config{
public :
SW m_sw ;
public :
Config(char *szVersion)
{
Config __pin *This = this ;
strcpy(this->m_sw.szVersion,szVersion) ;
} ;
}
Assume the calling code as following,
Config *pCfg1 = new Config("1.0.0.1") ;
char szVer[64]="Application ver." ;
szVer=strcat(szVer,pCfg1->m_sw.szVersion) ;
-->Here still get an error : can't conver char[64] to const char *
My question is how to convert managed char array to unmanaged char*?
Does anyone can help me to resolved this problem? Thank you very much.
Tsung-Yu
I meet some data convertion problem, the sample code as following,
namespace Configure
{
using namespace System ;
typedef struct _SW{
char szVersion[64] ;
} SW,*PSW ;
public __gc class Config{
public :
SW m_sw ;
public :
Config(char *szVersion)
{
Config __pin *This = this ;
strcpy(this->m_sw.szVersion,szVersion) ;
} ;
}
Assume the calling code as following,
Config *pCfg1 = new Config("1.0.0.1") ;
char szVer[64]="Application ver." ;
szVer=strcat(szVer,pCfg1->m_sw.szVersion) ;
-->Here still get an error : can't conver char[64] to const char *
My question is how to convert managed char array to unmanaged char*?
Does anyone can help me to resolved this problem? Thank you very much.
Tsung-Yu