我是在IOS上用GDB編譯,也是包如下錯誤,參考這邊文章以後就OK了
把我得#include "deque.h" 改成
#include <deque>, warning消失
以下為轉載內容:
著作權聲明:轉載時請以超連結形式標明文章原始出處和作者資訊及本聲明
http://jadue.blogbus.com/logs/31168910.html
用DEV-C++編譯是總是有警告:
32:2 C:\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting
the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. V-C++,
那麼你應該這樣(新標準)如下:
#include <iostream> //C++標頭檔,去掉.h
#include <fstream>
#include <cstdlib> //C標頭檔,在原有檔案名稱前加c,並去掉.h
using namespace std; //包括std名字空間
int main() //main函數必須返回int型,不再支援void
{
ofstream fout("output.dat", ios_base::binary);
//在檔案操作中使用ios_base類代替早期的ios類
return 0; //這一條語句何以省略
}