'Read hex stream in stdin
I want to transfer (For example) {0x000E, 0x09, 0x0022} in 'stdin'. I don't want to do it below method.
uint16 ulSize = 0;
uint8 ulType = 0;
uint16 ulTag = 0;
scanf("%x%x%x", &ulSize, &ulType, &ulTag);
Because I need to enter '\n' 3 times.
Is there a convenient way that I can transfer hex buffer using stdin??
Below link is where I refer. (Use scanf to take hex instructions input from the user and save them in char. (C))
Thanks ahead.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
