sleeppig992 9-10-2006 19:16
識C Program請進!!
我想問
const係點解???
同埋可以指教點做一個sodoku既program呀???
ALEX_LI 15-10-2006 02:22
'const' 表示那個是不變數:
e.g. const int x=10; // x=10 all the time in the function, changes will lead to errors
x=9; // this is an error
另一方面,你也可以用在set functions:
e.g. void function1(const int y) { // y will be the value put into when the function is called and should not be changed in the function.
y=8; // this is an error
}
........
function1(7); //y=7 in the function.
sleeppig992 19-10-2006 21:48
我想問typedef同埋static係c++內點解呢??
ALEX_LI 21-10-2006 01:45
[quote]原帖由 [i]sleeppig992[/i] 於 2006-10-19 21:48 發表
我想問typedef同埋static係c++內點解呢?? [/quote]
係咪code呢啊!!