摘要: unsigned short int *page=&myage; 阅读全文
posted @ 2008-11-26 21:12 雨城 阅读(225) 评论(0) 推荐(0) 编辑
摘要: ushort myage; ushort *page=0; myage=5; cout"myage: "myageendl; page=&myage; //将&myage的地址给page cout"*page: "*pageendlendl; 阅读全文
posted @ 2008-11-24 16:06 雨城 阅读(371) 评论(5) 推荐(0) 编辑
摘要: unsigned short shortvar=5; unsigned long longvar=65535; long svar=-65535; cout"shortvar:\t"shortvar; cout"\taddress of shortvar:\t"; cout&shortvarendl; 阅读全文
posted @ 2008-11-23 15:46 雨城 阅读(208) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;enum choice{ drawrect=1, getarea, getperim, changedimensions, quit};class rectangle{public: rectangle(int width,int height); ~rectangle(); int getheight()const{return i... 阅读全文
posted @ 2008-11-22 19:48 雨城 阅读(210) 评论(0) 推荐(0) 编辑
摘要: for(;;) { if(countermax) { cout"hello!"endl; counter++; } 阅读全文
posted @ 2008-11-22 17:19 雨城 阅读(223) 评论(0) 推荐(0) 编辑
摘要: int counter=0; for(;counter5;)//等同 for(counter=0;counter5;counter++) { counter++; cout"looping\n"; } 阅读全文
posted @ 2008-11-22 16:52 雨城 阅读(422) 评论(1) 推荐(0) 编辑
摘要: for(int i=0,j=0;i3;i++,j++) cout"i "i"j "jendl; 阅读全文
posted @ 2008-11-22 16:45 雨城 阅读(757) 评论(0) 推荐(0) 编辑
摘要: for (counter=0;counter5;counter++) cout"loop! "; 阅读全文
posted @ 2008-11-22 15:44 雨城 阅读(163) 评论(0) 推荐(0) 编辑
摘要: do { cout0); 阅读全文
posted @ 2008-11-22 15:20 雨城 阅读(324) 评论(2) 推荐(0) 编辑
摘要: while(true) { counter++; if(counter>10) break; } 阅读全文
posted @ 2008-11-22 15:08 雨城 阅读(276) 评论(0) 推荐(0) 编辑
摘要: while(smalllarge&&smallMAXSMALL) { small++; if(small%skip==0) { cout"skipping on "smallendl; continue;//跳到循环的开通 } if(large==target) { cout"targer reached!"; break; 阅读全文
posted @ 2008-11-21 21:51 雨城 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 生活的理想,就是为了理想的生活。 —— 张闻天 当你的希望一个个落空,你也要坚定,要沉着! —— 朗费罗 希望是厄运的忠实的姐妹。 —— 普希金 辛勤的蜜蜂永没有时间悲哀。 —— 布莱克 生活就是战斗。 —— 柯罗连科 自我控制是最强者的本能。 —— 萧伯纳 事业常成于坚忍,毁于急躁。 —— 萨迪 要成就一件大事业,必须从小事做起。... 阅读全文
posted @ 2008-11-21 21:44 雨城 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 转载 好漂亮的图片,不知道怎么做哦 阅读全文
posted @ 2008-11-21 16:53 雨城 阅读(524) 评论(0) 推荐(0) 编辑
摘要: while(smalllarge&&smallMAXSMALL){ if(small%5000==0) cout"."; small++; large-=2; } 阅读全文
posted @ 2008-11-21 12:07 雨城 阅读(315) 评论(0) 推荐(0) 编辑
摘要: while(counter5) { counter++; cout"counter is "counterendl; } 阅读全文
posted @ 2008-11-21 11:50 雨城 阅读(144) 评论(0) 推荐(0) 编辑
摘要: struct student { int num; char name[20]; float grade; }; 阅读全文
posted @ 2008-11-20 20:26 雨城 阅读(129) 评论(0) 推荐(0) 编辑
摘要: fprintf(stdout,"ch str\n"); fscanf(stdin,"%c %s",&ch,str); 阅读全文
posted @ 2008-11-20 20:00 雨城 阅读(341) 评论(1) 推荐(0) 编辑
摘要: #include 只有一个头文件 Read error 阅读全文
posted @ 2008-11-20 19:47 雨城 阅读(796) 评论(3) 推荐(0) 编辑
摘要: #include const double HD=3.1415926/180; void main() { cout"x\tsin(x)"endl; for (int i=0;i=180;i=i+30) couti"\t"sin(i*HD)endl; 阅读全文
posted @ 2008-11-20 19:10 雨城 阅读(631) 评论(0) 推荐(0) 编辑
摘要: #define YES 1 #define PI 3.1415926 #define RAD PI/180 #define MESG "This is a string." 阅读全文
posted @ 2008-11-20 18:55 雨城 阅读(112) 评论(0) 推荐(0) 编辑
摘要: #define MAX(a,b) ((a)>(b) ? (a):(b)) 阅读全文
posted @ 2008-11-20 18:40 雨城 阅读(105) 评论(0) 推荐(0) 编辑
摘要: #define PI 3.1416 #if 1 cout"i="iendl; #endif 阅读全文
posted @ 2008-11-20 17:34 雨城 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 400 主板 + 显卡 +声卡 200 内存 400 处理器 350 硬盘 200 电源 1600 阅读全文
posted @ 2008-11-06 17:13 雨城 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; float convert(float); void main() { float tempfer,tempcel; cout>tempfer; tempcel=convert(tempfer); cout<<"输出" <<tempcel; cout<<"hello world"; } float convert(float tempf... 阅读全文
posted @ 2008-11-05 16:35 雨城 阅读(328) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int area(int a,int b); void main(){ int A,B,C; cin>>A; if(A>B; if(B) // 等价于 if(B!=0) cout<<"B is number.\n"; C=area(A,B); cout<<"A * B is " <<C; } int area(i... 阅读全文
posted @ 2008-11-05 15:58 雨城 阅读(315) 评论(0) 推荐(0) 编辑