第 1 頁 (共 1 頁)
第一次用xcode不曉得要去哪裡指定標題檔??
發表於 : 05/30/2005 11:20 am
由 shellingford
如題
找不到iostream.h呢!
Re: 第一次用xcode不曉得要去哪裡指定標題檔??
發表於 : 05/30/2005 11:53 am
由 fortepianissimo
shellingford 寫:如題
找不到iostream.h呢!
locate iostream
/usr/include/gcc/darwin/3.3/c++/backward/iostream.h
/usr/include/gcc/darwin/3.3/c++/iostream
/usr/include/gcc/darwin/4.0/c++/backward/iostream.h
/usr/include/gcc/darwin/4.0/c++/iostream
/usr/include/php/Zend/zend_istdiostream.h
話說回來,應該只要 #include <iostream> 就好。我還沒用過 Xcode 寫 C++ (只有 Obj-C) — 是不是 project 種類沒設對?
發表於 : 05/30/2005 10:55 pm
由 shellingford
http://shellingford.myweb.hinet.net/error.tiff
恩~用了include變成這樣
總覺得是沒連結到lib
怎麼辦呢
順便一題
我的XCODE是1.1版

發表於 : 05/30/2005 10:58 pm
由 fortepianissimo
shellingford 寫:http://shellingford.myweb.hinet.net/error.tiff
恩~用了include變成這樣
總覺得是沒連結到lib
怎麼辦呢
順便一題
我的XCODE是1.1版

#include 後面不能加 ;
還有,在 gcc 3.0 以後, C++ 的 standard library headers 不用再加 .h
#include <iostream>
還要注意 namespace 是 std
發表於 : 05/31/2005 10:51 pm
由 shellingford
恩~覺得gcc和borland c++不太一樣呢
borland 新舊標題檔可以共通呢@@