3 ms·
I see what you are saying. So that function actually accepts a size_t which is a unsigned type. I now understand why this call to the function went through with
by winteriscoming 10y ago
I see what you are saying. So that function actually accepts a size_t which is a unsigned type. I now understand why this call to the function went through without any exceptions. When I posted my question, I was referring to this page[1] which claims the type for the "numBytes" to be a signed integer.
[1] https://www.lix.polytechnique.fr/~liberti/public/computing/prog/c/C/FUNCTIONS/write.html https://www.lix.polytechnique.fr/~liberti/public/computing/p...
- technion 10y agoI'm going to assume this is an age thing, because the example linked on that page has a date of 1996. This is more accurate for every platform I've actually worked with: http://man7.org/linux/man-pages/man2/write.2.html http://man7.org/linux/man-pages/man2/write.2.html
- LastSeagull 10y agoHello, I understand your example, but when putting write(fd, buf, count); inside your my_write function... it doesn't work. Is there something more? Thank you.