#include<iomanip> 设置字符填充,c可以是字符常或字符变量 终止已经设置的输出格式状态,在括号中应指定内容 #include<cstring> @strcpy : 函数原型: char* strcpy(char* str1,char* str2); 函数功能: 把str2指向的字符串 ...
分类:
其他好文 时间:
2017-09-03 10:07:32
阅读次数:
182
首先来看一段C程序: 再看一段: 特别要注意这两个函数的异同。 ...
分类:
其他好文 时间:
2017-08-26 23:32:26
阅读次数:
275
/************************************************************************************* * * HTran.cpp - HUC Packet Transmit Tool. * * Copyright (C) 200... ...
分类:
其他好文 时间:
2017-08-24 20:02:26
阅读次数:
149
包含头文件 字符串函数 字符串长度函数strlen 字符串连接函数 strcat 字符串复制函数strcpy 字符串比较函数strcmp ...
分类:
编程语言 时间:
2017-08-23 23:10:59
阅读次数:
378
strlen() 获取字符串长度,成功则返回字符串 string 的长度;如果 string 为空,则返回 0。 strcpy() head.h _strcpy().c main.c ...
分类:
Web程序 时间:
2017-08-20 16:51:40
阅读次数:
222
思路:字符串哈希,然后用普通的并查集维护即可。 ...
分类:
其他好文 时间:
2017-08-17 17:22:40
阅读次数:
200
消息队列:就是一个消息的链表。而一条消息则可看作一个记录,具有特定的格式。进程可以向中按照一定的规则添加新消息;另一些进程则可以从消息队列中读走消息 发送消息队列: #include<sys/types.h>#include<sys/msg.h>#include<sys/ipc.h>#include ...
分类:
其他好文 时间:
2017-08-15 23:02:31
阅读次数:
200
使用VS2005以上版本(VS2005、VS2008、VS2010)编译在其他编译器下正常通过的C语言程序,你可能会遇到类似如下的警告提示: 引用内容warning C4996: 'strcpy': This function or variable may be unsafe. Consider ...
分类:
其他好文 时间:
2017-08-11 23:08:46
阅读次数:
171
strlen函数原型:unsigned int strlen(const char *);返回的是字符串中第一个\0之前的字符个数。 1.strcat函数原型char* strcat(char* dest,const char* src); 进行字符串的拼接,将第二个字符串连接到第一个字符串中第一个 ...
分类:
其他好文 时间:
2017-08-07 16:41:04
阅读次数:
170
linux下ls命令(支持-R參数)的c语言实现: #include <stdio.h> #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> #include <pwd.h> #include <grp.h> #inclu ...
分类:
系统相关 时间:
2017-08-07 15:24:18
阅读次数:
194