我正在使用xcode在macOS X 10.6.2上使用C++項目。Pbl xcode C++ typedef結構toto toto
我試圖在Windows上編譯我的代碼,並沒有任何問題,我猜Linux正在工作,但我現在沒有一個與我在一起。
我的問題是Xcode中不接受這樣的指令:
struct direction {
double x;
double y;
double z;
double t; };
typedef struct direction direction;
這是我的錯誤:
/Users/sbarbier/dev/xcode/Infographie/TP9-RayTracing/RayTracing-Direction.h:22:0 /Users/sbarbier/dev/xcode/Infographie/TP9-RayTracing/RayTracing-Direction.h:22: error: changes meaning of 'direction' from 'typedef struct direction direction'
我使用GCC4.2並沒有改變任何東西。此代碼適用於每個平臺,任何人都可以幫助我嗎?
我只是試過,看起來像在Linux上工作 – 2009-11-24 09:29:00