I have a compiling example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
int main(int argc, char* argv[])
{
SM_HANDLE seaMAXHandle;
unsigned char data[2];
int model, commType, baudrate, parity;
// Open a COM 3
if (SM_Open(&seaMAXHandle, "COM3") < 0)
{
printf("Error opening COM 3.");
return -1;
}
......
| |
defined in the header, it's
|
extern int __stdcall SM_Open(SM_HANDLE* handle, char* connection);
| |
I use the exact same code in my project [inc headers] [a .dll project] and
Under the "COM3" I get error.
C++ argument of type is incompatible with parameter of type,
const char * is incompatible with type char *
what am I doing wrong so that it doesn't compile?
In all honestly I'd rather use something variable in it's place anyway but the only thing I've had not error [tried everything in my limited range] is a char * [pointer?] to a empty char [which I can't to be useful]
not wanting to bleat on about it but I'd really like to understand this correctly because often I just throw every thing, of the little I know, at it, sometimes it works,