摘要:
#include中包含的函数 strlen求字符串长度 strcmp比较2个字符串是否一样strcat字符串连接操作strcpy字符串拷贝操作strncat字符串连接操作(前n个字符)strncpy字符串拷贝操作(前n个字符)strchr查询子串strstr查询字串注意:C++中,stri... 阅读全文
posted @ 2015-05-11 20:27 lwflourish 阅读(344) 评论(0) 推荐(0)
|
|||
|
摘要:
#include中包含的函数 strlen求字符串长度 strcmp比较2个字符串是否一样strcat字符串连接操作strcpy字符串拷贝操作strncat字符串连接操作(前n个字符)strncpy字符串拷贝操作(前n个字符)strchr查询子串strstr查询字串注意:C++中,stri... 阅读全文
posted @ 2015-05-11 20:27 lwflourish 阅读(344) 评论(0) 推荐(0)
摘要:
传统 C++其中包含的引用头文件如下:#include //设定插入点#include //字符处理#include //定义错误码#include //浮点数处理#include //文件输入/输出#include //参数化输入/输出#include //数据流输入/输出#incl... 阅读全文
posted @ 2015-05-11 20:24 lwflourish 阅读(172) 评论(0) 推荐(0)
摘要:
malloc原型:extern void* malloc(unsigned int num_bytes);头文件:#include返回值: 返回void*指针,因此必要时需要进行类型转换备注:void* 表示未确定类型的指针,void *可以指向任何类型的数据,更明确的说是指申请内存空间时还不知道用... 阅读全文
posted @ 2015-05-11 18:03 lwflourish 阅读(123) 评论(0) 推荐(0)
摘要:
转载自:求一个数转换为二进制中1的个数// Count1--01.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include using namespace std;int coutn1(int num){ int result = 0; whil... 阅读全文
posted @ 2015-05-11 15:52 lwflourish 阅读(255) 评论(0) 推荐(0)
摘要:
数组循环移位算法详细介绍:http://blog.chinaunix.net/uid-26642637-id-3291386.html方法1」利用memcpy函数,需开辟临时空间。先把从a+n-k到a+n-1这k个字符,存到tmp中;然后,把以a开始的地址空间中的字符复制到a+k开始的地址空间中去;... 阅读全文
posted @ 2015-05-11 15:43 lwflourish 阅读(157) 评论(0) 推荐(0) |
|||