a=Buffer[1];
s+= a; //How can I get the character representation here?
s+= "x";
s = s->Concat(s , spc);
for(int j =2; j < 6 ; ++j){
if (Buffer[j]!=0xFF)
{
s = s->Concat(s , Buffer[j]); //note converts the BCD values to its numeric equivalents
}
else continue;
}
SetTimeResponse_lbl->Text = s;
The output in SetTimeResponse_lbl becomes
64x:1204
I understand S-> concat translates the character variable into its numeric representation. But what I want is to translate
Buffer[1] into its character representation, so the output should be:
To: cantide5ga
"
Let me know if I am missing something, but to answer the question of getting the string representation of a char array, you could simply cast it:
cout << (string)Buffer;
I noticed @ was spit out given the character code of 64, but do you want it to be represented in another way?
"
My Buffer contains a mixture of integer values and characters. So some need to be translated into characters (in the example, the @ character indeed) and others need to be converted from their binary value to a decimal representation.