作者gwliao (gwliao)
看板NTUGIEE_EDA
標題Re: [問題] 要怎麼寫有compiler warnning msg的程式?
時間Thu Jul 6 06:39:51 2006
※ 引述《moonshade (一隻歐拉貓)》之銘言:
: gnu常常會出現
: this feature is obsolete....blah blah
: 有沒有人知道要怎麼寫這個warnning啊
是底下的這種? 要討罵還蠻簡單啊~~~
---------------------------------------------------------------------------
gwliao@0[tmp]$ cat test.cpp
int main(void) {
int S=0;
for(int t=0;t<10;t++)
S=S+t;
S=S+t*2;
};
gwliao@0[tmp]$ g++ test.cpp
test.cpp: In function `int main()':
test.cpp:6: error: name lookup of `t' changed for new ISO `for' scoping
test.cpp:4: error: using obsolete binding at `t'
gwliao@0[tmp]$
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.48.60
→ moonshade:不是耶~~~ 07/06 10:29
→ moonshade:是call了某些function 已經不給人用的~~ 07/06 10:29
→ gwliao:man gets, 是這種嗎? 07/06 14:57