11-24-2009 03:20 PM
So is there a way to to send "type anything you want" as unsigned char data instead of char?
I know U can build a struct, and force data to be signed or unsigned, but for a string inside quotes in something like sprintf and similar is there a way toforce it?
11-24-2009 03:34 PM - edited 11-24-2009 03:39 PM
Yes find the compiler flag that tells the compiler to use unsigned character strings as default. Visual C uses for this /J which is best used when compiling code to link with LabVIEW headers.
Or admittedly considered very ugly by most, typecast the string constant to an unsigned character string specifically
(CStr)"This is any string treated as unsigned char array!"
If the typecast is uglier than the warning message you have to decide yourself. I personally think C compilers complaining about this with default warning level, are a bit over the top.
11-25-2009 03:05 PM
Are you using .cpp or .c?
I had problem with .cpp before with LStrPrintf. Change to .c solve all the problem.
George Zou