test {} and the "for" structure
#include
int true_or_false();
int true_or_false()
{
static j = 0;
j++;
if(j == 20)
return 0;
else
return 1;
}
int main(int argc, char* argv[])
{
{
int i;
i=1;
cout << i << endl;
}
int i;
i=2;
cout << i << endl;
{
for(int i = 0; true_or_false(); i++)
cout << i;
}
return 0;
}
1,在{}內聲明的實例,在退出{}時會調用析構函數析構
2,自己以前對判斷條件的理解太片面了。
原文轉自:http://www.kjueaiud.com
- 評論列表(網友評論僅供網友表達個人看法,并不表明本站同意其觀點或證實其描述)
-
老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月
|