//省略
#include <ifstream>
//省略
lib.h:9:10 fatal error: ifstream: No such file or directory
#include <ifstream>
我先检查了相关代码有没有写错——没写错。
也许是G++版本不够,编译不了C++11的代码——
被修复的问题:
lib.cc:4:9: warning; ISO C++11 requires whitespace after the macro name
省略
也许是文件放错位置了??可是·
//省略
#include <ifstream>
#include <ofstream>
//省略
头文件是这个,ifstream ,ofstream 都是其中定义的类
#include <fstream>