なんでそんな変なモードを使いたいのかわからないが
fstream fs("filename.txt", fstream::in | fstream::out | fstream::app);
とかは?