- 博客(7)
- 资源 (24)
- 收藏
- 关注
原创 简单socket通信过程(TCP)
首先要链接库文件:Property->Linker->Input->Additional Dependencies中加入ws2_32.lib或者代码里加入:#pragma comment(lib, "Ws2_32.lib")先运行服务器端后运行客户端// 服务器端#include#includeusing namespace std;int _tmain(int argc
2011-09-27 23:05:48 1062
原创 大数相乘
#include #include void BigNumMultiply(const char *str1, const char *str2, char *product){ assert(str1 != NULL && str2 != NULL && product != NULL); int i, j; int len1 = (int)strlen(str1); int
2011-09-15 17:17:31 883
原创 KMP算法
// 求子串nextval[]数组// 如: // 元素编号 0 1 2 3 4 5 6 7// 子串 a b a a b c a c// next值 -1 0 0 1 1 2 0 1// nextval值 -
2011-09-09 17:27:04 1074
原创 将一个长度为n的字符串向左循环移动m位
// 将一个长度为n的字符串向左循环移动m位,如:hello,world向左移动3位就变成了lo,worldhel// 思路:把字符串切成长为m和n-m的两半,先分别对两部分进行逆序,最后对整个字符串逆序。#include using namespace std;void ReverseString(char * const str, const int count);void
2011-09-08 11:52:03 4162
原创 将字符串中的单词进行倒序
// 将字符串中的单词进行倒序,如:hello,world 倒序后:world,hello// 思路:先将整篇文章进行倒序,然后将所有单词进行倒序// 整篇文章倒序:dlrow,olleh// 所有单词倒序:world,hello#include using namespace std;void ReverseString(char * const str, const int c
2011-09-08 11:25:21 4204
原创 C/C++面试题(整理)
1.new、delete、malloc、free关系答:new和delete,malloc和free都可以用来申请动态内存和释放内存。malloc和free是C/C++语言的标准库函数,new和delete是C++的运算符。new和delete在分配内存时会执行构造函数,de
2011-09-07 10:06:18 1721
转载 C++多态的实现原理
1. 用virtual关键字申明的函数叫做虚函数,虚函数肯定是类的成员函数。2. 存在虚函数的类都有一个一维的虚函数表叫做虚表。类的对象有一个指向虚表开始的虚指针。虚表是和类对应的,虚表指针是和对象对应的。3. 多态性是一个接口多种实现,是面向对象的核心。分为类的多态性和
2011-09-06 15:13:49 43188 18
xware-desktop_0.13.20141115_amd64.deb
2015-09-19
我的emacs配置
2011-10-30
GDI+ SDK参考(翻译版本)
2011-05-17
wtl81 支持vs2010
2011-03-18
WTL81_9127
2011-02-26
C++设计模式(用C++写的还有简单的介绍)
2011-01-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人