2011年6月17日 星期五

warning: this decimal constant is unsigned only in ISO C90

今天compile時看到一個Warning message寫著

warning: this decimal constant is unsigned only in ISO C90

當做Pointer是否溢位的判斷時,因為用到了4294967295這個值來做比對而導致C90的問題

對一個Pointer來說 4294967295,當表著一個最大的位置,本身應當是沒錯的

可是當我們直接拿來使用時compiler不知道它真正的用途而報警告

這時只要我們將4294967295加上一個u,即4294967295u,讓compiler知道這是一個unsigned的值,就不會報錯了。

2011年6月9日 星期四

invalid project description

Today , when I went to create a new Android project from existing source , Eclipse give me a message with "invalid project description" and cannot create the project.

After I move the source from Eclipse workspace to other place, everything is ok.

今天我要從一個現有的專案去建立一個新專案時
Eclipse給了我一個訊息 "invalid project description"
然後也沒建出來新的專案


當我把原先想加入的專案從Eclipse的workspace移到別的地方後這個問題就解決了




PS:我怎麼覺得中文比英文難寫…