Using OpenAPI in C++
I'm using the OpenAPI in a C++ program. My C++ program uses alot of "string" datatypes.
I'm trying to get my username and password from string variables into my IIAPI_CONNPARM.co_username and IIAPI_CONNPARM.co_password which are character pointers. Neither strcpy or ='s works, expectedly, as I have mismatched datatypes.
This may be a C++ question more than an OpenAPI question, but I'm hoping someone can help me populate this.
//code snippet
string user;
...
iiConn.co_username = user; // doesn't compile, cant convert string to char* in assignment
strcpy(iiConn.co_username, user); // doesn't compile either
...
IIapi_connect (&iiConn);
...
Is there some casting function out there. I'm not that familiar w/ C++ and I've been unable surfing for an answer.
Thanks,
Mary
|