I have const binary data that I need insert to buffer
for example
char buf[] = "1232\0x1";
but how can do it when binary data is at first like below
char buf[] = "\0x11232";
compiler see it like a big hex number
but my perpose is
char buf[] = {0x1,'1','2','3','2'};
You can use compile-time string concatenation:
However, with a 2-digit number after\xit also works without: