I have trouble to find a good solution for the following scenario:
A write function takes a const char, which is given as an user-input through cin.get(ch) by calling write(ch). ch is a char.
while (c.active())
{
char ch;
cin.get(ch); // blocking wait for standard input
if (ch == 3) // ctrl-C to end program
break;
c.write(ch);
}
This works fine, but I would like to modify it, so that it is possible to make an input like: "0A00CD88" or "0A 00 CD 88" and use it as input for write, which is using it as input for boost::asio::buffer.
In order to do so, I can use C/C++ and boost.
Thanks to anyone who shares knowledge on this matter!