iam working on some project in which i need to open a file descriptor and send it to the streambuf,
which iam doing like
Code:
Code:
ifstream f(fd); streambuf * buf2=f.rdbuf();
Code:
Code:
ifstream f((const char *)fd) streambuf * buf2=f.rdbuf();
there are many ways are also there like
Code:
Code:
File *ptr=fdopen(fd);
but i want the the output to be given in streambuf which other parts of my project is using,
can u tell me is there any way to convert the file pointer to the streambuf or is there anyway of reading the file so that the output will result in the streambuf
with this convention
Code:
Code:
((const char *)fd)
