摘要: 1 #include <iostream> 2 using namespace std; 3 4 class gugu 5 { 6 public: 7 8 void tuiqian(); 9 10 private:11 12 int a;13 char b;14 15 };16 17 18 19 void gugu::tuiqian()20 {21 cout<<"***************"<<endl;22 }23 24 int main()25 { gugu tq;26 tq.tuiqian();27 28... 阅读全文
posted @ 2011-11-20 14:28 贰百舞 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1 下载文件要用到操作系统的API函数,下面是一个WINDOWS系统中的实现: 2 3 //--------------------------------------------------------------------------- 4 5 #include <stdio.h> 6 #include <windows.h> 7 #include <wininet.h> 8 #define MAXBLOCKSIZE 1024 9 #pragma comment( lib, "wininet.lib" ) ;10 11 void d 阅读全文
posted @ 2011-11-20 14:26 贰百舞 阅读(6202) 评论(1) 推荐(1) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 int jc(int n) 4 { 5 int a=1; 6 if (n<0) cout<<"ERROR!"; 7 else if (n==0||n==1) a=1; 8 for(int i=1;i<=n;i++) 9 a=a*i;10 return a;11 }12 13 int main()14 { 15 cout<<jc(-100)<<endl;16 cout<<jc(0)<<endl;17 阅读全文
posted @ 2011-11-20 11:08 贰百舞 阅读(219) 评论(0) 推荐(0) 编辑