Hi
I'm having a little trouble trying to send an IS_MST through C++. I've used the C example to set it up, and it can establish a connection. I'm trying to send a message on connection though. Here's what I have:
I realise that all of the spaces may not be the best way to make it a 64-byte char, but I don't think that's causing the problem. I get the error message:
But I can't see anything that says it's a const char? A google search told me that I can't cast it to a char. So how do I get it to read it as a char?
Any help would be excellent, my C++ is gone fairly rusty at this stage, haven't touched it in months
Rob
I'm having a little trouble trying to send an IS_MST through C++. I've used the C example to set it up, and it can establish a connection. I'm trying to send a message on connection though. Here's what I have:
struct IS_MST is_mst;
memset(&is_mst, 0, sizeof(struct IS_MST));
is_mst.Size = sizeof(struct IS_MST);
is_mst.Type = ISP_MST;
is_mst.ReqI = 0;
is_mst.Zero = 0;
is_mst.Msg[64] = ("^7InSim Connected Successfully! ");
I realise that all of the spaces may not be the best way to make it a 64-byte char, but I don't think that's causing the problem. I get the error message:
error C2440: '=' : cannot convert from 'const char [64]' to 'char'
But I can't see anything that says it's a const char? A google search told me that I can't cast it to a char. So how do I get it to read it as a char?
Any help would be excellent, my C++ is gone fairly rusty at this stage, haven't touched it in months
Rob