亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2505 | 回復(fù): 4
打印 上一主題 下一主題

[FreeBSD] 問一個(gè)菜問題---怎么在FREEBSD下用C++? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2003-03-26 17:28 |只看該作者 |倒序?yàn)g覽
我是個(gè)新手,想在FREEBSD下學(xué)習(xí)C++,已經(jīng)裝了GCC,編譯C程序很正常,可是編譯C++程序就出問題:老是出現(xiàn)如下錯(cuò)誤:
bash-2.05b$ g++ Hello.cpp -o hello
In file included from /usr/include/g++/backward/iostream.h:31,
                 from Hello.cpp:1:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #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 <sstream>; instead of the deprecated header <strstream.h>;. To disable this warning use -Wno-deprecated.
或者是:
bash-2.05b$ g++ file2.C -o file2
file2.C: In function `int main()':
file2.C:5: `cout' undeclared (first use this function)
file2.C:5: (Each undeclared identifier is reported only once for each function
   it appears in.)
file2.C:7: `cin' undeclared (first use this function)
請(qǐng)各位指教,我剛學(xué),比較菜,如能說詳細(xì)點(diǎn),不盛感激

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2003-03-26 18:00 |只看該作者

問一個(gè)菜問題---怎么在FREEBSD下用C++?

源文件貼出來

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2003-03-26 18:24 |只看該作者

問一個(gè)菜問題---怎么在FREEBSD下用C++?

好象是頭文件的缺省目錄不對(duì)。使用/usr/include/g++/試試。

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2003-03-26 18:33 |只看該作者

問一個(gè)菜問題---怎么在FREEBSD下用C++?

...


樓主看一下編譯信息,原因和解決的辦法都在這里解釋得很清楚了呀!

bash-2.05b$ g++ Hello.cpp -o hello
In file included from /usr/include/g++/backward/iostream.h:31,
from Hello.cpp:1:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #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 <sstream>; instead of the deprecated header <strstream.h>;. To disable this warning use -Wno-deprecated.
或者是:
bash-2.05b$ g++ file2.C -o file2
file2.C: In function `int main()':
file2.C:5: `cout' undeclared (first use this function)
file2.C:5: (Each undeclared identifier is reported only once for each function
it appears in.)
file2.C:7: `cin' undeclared (first use this function)

論壇徽章:
5
榮譽(yù)會(huì)員
日期:2011-11-23 16:44:17CU大牛徽章
日期:2013-09-18 15:15:15CU大;照
日期:2013-09-18 15:15:45未羊
日期:2014-02-25 14:37:19射手座
日期:2014-12-26 22:55:37
5 [報(bào)告]
發(fā)表于 2003-03-26 20:46 |只看該作者

問一個(gè)菜問題---怎么在FREEBSD下用C++?

老問題了,你的程序肯定沒有按照新的C++變種標(biāo)準(zhǔn)寫,cout實(shí)在namespace std中的。
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP