- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 重新字符串拷贝函数strcpy
char *strcpy(char *strDest,const char *strSrc){ assert((strDest!=NULL)&&(strSrc!=NULL)); char *address=strDest; while(*strSrc!='\0') { *strDest++=*strSrc++; } *strDest
2012-11-01 23:10:52
420
原创 冒泡排序bubbleSort
#include using namespace std;void bubbleSort(int arr[],int count){ int i = count,j; int temp; while(i>0) { for(j=0;j<i-1;j++) { if(arr[j]>arr[j+1])
2012-10-13 21:32:35
605
原创 字符串单词首字母大写
#include int main(){ char s[100]; gets(s); if(s[0]>='a'&&s[0]<='z') s[0]-='a'-'A'; for(int i=0;s[i]!='\0';i++) { if(s[i]'Z'&&s[i]'z') if(s[i+1]>='a'&
2012-10-13 19:53:34
1524
1
原创 VC++创建一个Windows窗口程序
本文为《VC++深入详解》第一章的笔记创建一个完整的Windows窗口程序主要步骤为WinMain函数的定义创建一个窗口编写消息循环编写窗口过程函数窗口的创建:消息循环:在创建、显示、更新窗口之后,我们需要编写一个消息循环,不断从消息队列中取出消息,并进行响应。GetMessage(),Peekmessage()从消息队列中取出消息,并保存在消息结构体中
2012-09-19 16:50:33
7692
2
原创 C++计算一个整数的位数并分别存储每一位
//C++计算一个整数的位数并分别存储每一位#include #include #include using namespace std;//获取一个int的位数int GetNumDigits(int val){ int numDigits = 0; if (val == 0) return 1; while (val != 0)
2012-09-16 12:01:39
3865
原创 HDOJ 1002 - A + B Problem II
原题地址 : http://acm.hdu.edu.cn/showproblem.php?pid=1002#include //#include #include #include #include #include using namespace std;int main(int argc, char const *argv[]){ int a=0,b=0; int
2012-03-17 20:54:22
460
原创 ZOJ 1115-Digital Roots
原题地址: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1115#include //#include #include #include using namespace std;int main(){ //ifstream cin("in.txt"); string s;
2012-03-17 20:52:42
360
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人