Home > Software engineering >  What is the meaning of this sentence memset ah...
What is the meaning of this sentence memset ah...

Time:09-21

Memset (pOutData + barcode_len, 0 x20, 59 - barcode_len);

In the middle of the 0 x20 how to understand

CodePudding user response:

Fill the data of 0 x20

CodePudding user response:

Is replaced with the blank space

CodePudding user response:

refer to the second floor NKLMJF response:
is replaced with Spaces?
is

CodePudding user response:

Can be written as "

CodePudding user response:

S (first parameter) is pointing to a piece of the content of each byte of memory all ch (the second parameter) is set to the specified ASCII value, the size of the block designated by the third parameter, the function usually do for the new application of memory initialization, its return value is a pointer to the s,

CodePudding user response:

Memset
Sets buffers to a specified character.

Void * memset (void * dest, int c, size_t count);
Memset is the dest to a memory location, C this character to fill the count length,
Your case is memset (pOutData + barcode_len, 0 x20, 59 - barcode_len);
They watch pOutData pointer to the location of the ward barcode_len began, with 0 x20 (ASCII characters of Spaces) to populate the 59 - barcode_len length
  • Related