Help with string conversion in C++ ????

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Help with string conversion in C++ ????

Postby krambriw » Thu Jan 04, 2007 7:18 pm

Hello everybody,

I received my USB-UIRT devices today and they are already up and running.

From my C++ program (win32) I'm able to communicate with them, i.e. I'm sending pronto codes and my other (receiver) devices are responding nicely.

However, I would ask if someone could help me with a small and most likely simple matter;

I put my all my pronto codes in an ini-file and retrieve them with "GetPrivateProfileString". So basically I have all of them in CStrings.

To send them using "fn_UUIRTTransmitIR" I would like to convert them to a char [2048] like this

CString gIR_ON = "0000 006D 0000 0019 000D 0027 0027 000D 000D 0027 0027 000D 000D 0027 000D 0027 000D 0027 000D 0027 000D 0027 0027 000D 000D 0027 000D 0027 000D 0027 000D 0027 000D 0027 000D 0027 000D 0027 000D 0027 000D 0027 0027 000D 000D 0027 0027 000D 000D 0027 0027 000D 000D 01AB";

char gIRCodeON[2048] = gIR_ON;


This doesn't work.

Greatful for any advice,

Best regards Walter
krambriw
 
Posts: 2
Joined: Thu Jan 04, 2007 7:02 pm

Postby mri » Thu Jan 04, 2007 9:44 pm

strcpy(gIRCodeON, gIR_ON);
mri
 
Posts: 2
Joined: Tue Jan 02, 2007 9:30 pm

Postby krambriw » Thu Jan 04, 2007 10:13 pm

Thanks a lot m8!

Kind regards, Walter
krambriw
 
Posts: 2
Joined: Thu Jan 04, 2007 7:02 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron