1

Opening FD and append Data

view story
linux-howto

http://www.unix.com – Hello everybody I'am trying to open a File with an Filedeskriptor. After Opening the file I want to append Data to the File! I have the following code now, but I only overwrite the data from the file and did not append it! Code: void Buffer::writeIntoFile(std::string name, int length, std::string text){     int fd;     FILE *fp;     std::ofstream ofs;     if((fd = open(name.c_str(),(O_CREAT|O_WRONLY|O_RDONLY))) < 0){       cout << "Error Opening File\n";     }     if((fp = fdopen(fd, (HowTos)