thinking in c++ 2e 的小小的错误吗?
我看的是电子版,pdf格式,在第80页(也就是More about iostreams小节中的Simple file manipulation)中的一段代码
//: C02:Incident.cpp
// Records an incident using INCR
#include <cstdlib> // Declare "system()"
using namespace std;
int main() {
// Other code here...
system("incr < incident.dat > incident.dat");
} ///:~
这里不需要用名字空间,不然编译会出错,因为cstdlib并没用名字空间