关于ofstream的问题,大侠帮忙看一下
#include <iostream>
#include <fstream>
using namespace std;
int main(){
ofstream t("balance", ios::out);
int a=t.fdbuf()->fd();
}
报错如下:
err:
no matching funciton for call to 'std::basic_filebuf<char,std:::char_traits<char>>::fd;
可是在filebuf类中,明明是有fd()这个函数的,哪位大侠告诉我为什么调用不了?