Hello all, 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(); but main problem is that they are casting to Code: Code: ifstream f((const char *)fd) streambuf * buf2=f.rdbuf(); because of which the file is not getting opened ,if i remove that leads to error there are using some conventions there are many ways are also there like Code: Code: File *ptr=fdopen(fd); which is successfull and returning the value. 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) please help me.