#Where is std::ostream::gcount()???

25 messages · Page 1 of 1 (latest)

flat gate
#

Literally fwrite() shows you the number of bytes which were written successfully???

subtle berryBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

sonic owl
#

What does it mean

flat gate
quiet cedar
#

use sputn, rdbuf that spits back to the count of chars written

#

or, for file streams, grab tellp before and after you write

#

substract to get the diff.. assuming its seekable

flat gate
quiet cedar
#

there is no direct gcount for output

#

thats input territory

#

but to get how many bytes actually hit the file grab the streambuf and use sputn

sonic owl
#

gcount means get count

flat gate
dark wharf
flat gate
#

check my last post about popen, I gave up and used fwrite

dark wharf
#

k ^^

flat gate
# dark wharf k ^^

oh and, due to fopen's internal buffer and flushing, a.k.a. write(1, buff, dataLen) runs, GOD knows when, this gets more complicated

dark wharf
#

yeah. tbh, I'd just use the plain posix functions for stuff like pipes.

flat gate
#

!solved

subtle berryBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

flat gate