Description 输入3个字符串(长度都小于80),按由小到大顺序输出。 Input 多组测试数据,每组输入三个字符串。 Output 按从小到大输出三个字符串。 ...
分类:
其他好文 时间:
2018-11-30 11:19:16
阅读次数:
233
在VS中调用 strcpy、strcat 等函数时会提示 _CRT_SECURE_NO_WARNINGS 警告,原因是这些函数不安全,可能会造成内存泄露等。比如: 所以建议采用带_s的函数,如strcpy_s,calloc_s。 当然,如果执意使用老版本、非安全版本函数,可以使用 _CRT_SECU ...
分类:
其他好文 时间:
2018-11-29 11:08:33
阅读次数:
141
水题~ #include<iostream> #include<algorithm> #include<string.h> #define maxn 25 using namespace std; typedef long long ll; char s[maxn],ttime[10]; int m ...
分类:
其他好文 时间:
2018-11-27 22:17:32
阅读次数:
216
Action(){ char *url = "127.0.0.1:1080"; char arr_url[1024]; //将url变量的值复制给p_url1参数 lr_save_string(url,"p_url"); //将p_url1参数的值复制给arr_url变量 strcpy(arr_ur ...
分类:
其他好文 时间:
2018-11-27 13:04:42
阅读次数:
162
1strcmp and strncmp 2.strcpy and strncpy 自实现精炼版本 3.strcat and strncat 自实现精炼版本 ...
分类:
其他好文 时间:
2018-11-26 23:19:30
阅读次数:
394
1、去空格及特殊符号 s.strip().lstrip().rstrip(',') 2.复制字符串 #strcpy(sStr1,sStr2) sStr1 = 'strcpy' sStr2 = sStr1 sStr1 = 'strcpy2' print sStr2 3.连接字符串 #strcat(sS ...
分类:
其他好文 时间:
2018-11-26 20:02:13
阅读次数:
209
加分题 mybash的实现 使用fork,exec,wait实现mybash 写出伪代码,产品代码和测试代码 发表知识理解,实现过程和问题解决的博客(包含代码托管链接) 1、了解 的功能 2、了解 的功能 3、了解 的功能 3、了解 的功能 4、编写 思路 shell程序的主循环分为以下几步: 用户 ...
分类:
其他好文 时间:
2018-11-25 20:03:07
阅读次数:
198
题目一: [cpp] view plaincopy void GetMemory( char *p ) { p = (char *) malloc( 100 ); } void Test( void ) { char *str = NULL; GetMemory( str ); strcpy( st... ...
分类:
其他好文 时间:
2018-11-24 21:00:47
阅读次数:
190
20165324_mybash的实现 实验要求 实验要求: 1. 使用fork,exec,wait实现mybash 2. 写出伪代码,产品代码和测试代码 3. 发表知识理解,实现过程和问题解决的博客(包含代码托管链接) 背景知识 Shell的介绍 shell是一个程序,可以称之为壳程序,用于用户与操 ...
分类:
其他好文 时间:
2018-11-24 18:53:44
阅读次数:
245
#include #include using namespace std; class stringfun { char name[20]; public: void concatString(char a[],char b[]) { strcat(a," "); strcat(a,b); ... ...
分类:
编程语言 时间:
2018-11-23 21:29:28
阅读次数:
217