On Thu, Feb 09, 2006 at 05:56:31PM -0500, Robbie wrote:
> I'm not sure why but I created a char *, write the char to it and it works that way instead of including the hex in the write function; something like write(fd, mychar, 1) instead of write(fd, "0x16",1).
> Is this the only way for user program to write bytes to an IO?
Of course, man 2 write:
ssize_t write(int fd, const void *buf, size_t count);
The second parameter is the _address_ of a buffer and the third
the size of the buffer (number of characters).
Do you mix up with putc(3) and friends?
- Re: IO
- From: "Robbie" <firstname.lastname@example.org>