I am writing a program that sends ascii text out the serial port to a simple display device.The device talks 8-N-1 but we all know ascii only needs 7 bits for numbers and letters on the first ASCII chart; so the display has a "value added" feature that if the eight bit is set high,then that character is blinking. I know setting the eight bit will add 128 to the decimalvalue of the character so this is the code I wrote:
char c_Letter;char c_LetterBlinking;
c_LetterBlinking = (c_Letter + 128);
My question is: Although this does the job and I send the letters out the port; my MS Vis C++ 6.0 compiler gives me a warning on the equals sign telling me:"converting from int to char, possible loss of data"So, there must be a better way.....too bad the compiler can't just come out and show me how it thinks I should be writing code.