How to return an fstream (C++0x)

前端 未结 3 472
一整个雨季
一整个雨季 2020-12-11 04:17

I think I\'ll get right into it and start with the code:

#include 
#include 
#include 

class test : public std:         


        
3条回答
  •  甜味超标
    2020-12-11 05:11

    Does the caller need to know that you are returning an ofstream, or would it make more sense to return a streambuf, and let the caller wrap it inside a stream?

提交回复
热议问题