Home > Back-end >  Consult how to format the array?
Consult how to format the array?

Time:09-30

There were 16 elements of an array, I think into hexadecimal output character, I now use the for () loop, as follows, but feel the efficiency is not high, is there a library function directly one-time conversion of multiple elements?
 for (UINT I=0; i <16. I++) 
{
A.F ormatV
A.F ormat (_T (" % 02 x "), rx_buf [j * 16 +] I);
StrDisplayBuf +=a;
}
StrDisplayBuf +="\ r \ n";

CodePudding user response:

Is it to me so directly? That is good, because I do with MFC Edit display only a second 10000 row data, but I need to achieve 16000 lines, also don't know to be optimized,,

A.F ormat (_T (" % 02 x % 02 x % 02 x % 02 x x % % 02 02 x x % % 02 02 x % 02 x % 02 x % 02 x % 02 x % 02 x % 02 x % 02 x % 02 x "),
Rx_buf [j * 16 + 0], rx_buf [j * 16 + 1], rx_buf [j * 16 + 2], rx_buf [j * 16 + 3], rx_buf [j * 16 + 4],
Rx_buf * 16 + 5 [j], rx_buf * 16 + 6 [j], rx_buf * 16 + 7 [j], rx_buf * 16 + 8 [j], rx_buf [j * 16 + 9],
Rx_buf * 16 + 10 [j], rx_buf * 16 + 11 [j], rx_buf * 16 + 12 [j], rx_buf [j * 16 + 13], rx_buf * 16 + 14 [j],
Rx_buf * 16 + 15 [j]);

CodePudding user response:

Formerly the original poster that code is slow down the speed of the main culprit, have been previously considered to be the Edit display speed can't keep up with, in 2 floor of code shows completely with the ~ ~ ~ ha ha ~ ~

CodePudding user response:

Ask yourself what the answer is a,,,,

CodePudding user response:

CodePudding user response:

CodePudding user response:

  • Related