码迷,mamicode.com
首页 >  
搜索关键字:strcat strcpy    ( 1155个结果
c++给定字符分割
1 //c++给定字符分割 2 #include<iostream> 3 #include<vector> 4 #include<string.h> 5 using namespace std; 6 int main() 7 { 8 /* 最终把要分割的字符串根据给定分隔符划分为多个短的字符串*/ ...
分类:编程语言   时间:2020-01-12 11:28:35    阅读次数:91
c语言基础常用字符串数组函数与结构体
字符串常用函数 printf("%d",sizeof(arr));//可查看数组arr所占用的内存(一个int占4位,char占一位) strcpy(arr1,arr2); 将arr2中的内容拷贝到arr1中;arr1的内存需大于arr2 strcmp(arr1,arr2); 逐个比较,若arr1> ...
分类:编程语言   时间:2020-01-10 20:38:22    阅读次数:102
VS2010/MFC 获取当前程序路径的方法
第一种方法 DWORD GetCurrentDirectory( DWORD nBufferLength, // size, in characters, of directory buffer LPTSTR lpBuffer // pointer to buffer for current dir ...
分类:编程语言   时间:2020-01-05 15:53:10    阅读次数:158
指针的面试题目及相关
char *p = "ABCD",strcat https://zhidao.baidu.com/question/1670289637897433867.html https://wenku.baidu.com/view/fc35b5f3a48da0116c175f0e7cd184254b351b ...
分类:其他好文   时间:2019-12-31 23:18:56    阅读次数:88
编写一个实现字符串替换的程序,
1: 题目 健写一个实现字符串替换的程序,该程序必须似含函数 replace(char*s,char*t,char“u),该函数实现将字符串s中所有出现的子串t替换为串u,并 输出替换后的串及替换的子串个数。若s中不包含子串t,则输出提示信息:没有满足条件的子串t。例如:replace("java ...
分类:其他好文   时间:2019-12-31 21:47:06    阅读次数:198
实验七
《实验七》 验证性实验1: 验证性内容2: 验证性内容3: 验证性内容4: 以二进制形式存入file4.dat后,内容不可以直接读出 编程练习: #include <stdio.h>#include <stdlib.h>#include <string.h>const int N = 5;typed ...
分类:其他好文   时间:2019-12-31 17:08:02    阅读次数:83
实验七
#include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; ...
分类:其他好文   时间:2019-12-31 01:38:21    阅读次数:79
实验6
#include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; ...
分类:其他好文   时间:2019-12-25 01:54:14    阅读次数:99
A1006
输入n行员工id以及到达和离开的时间,输出最早到达的员工的id和最晚离开的员工的id 注:字符串赋值函数strcpy(目标字符串,原字符串)字符串之间的赋值使用该函数,需要#include<string.h> 1 #include<cstdio> 2 #include<string.h> 3 int ...
分类:其他好文   时间:2019-12-24 14:00:06    阅读次数:153
实验6
#include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; ...
分类:其他好文   时间:2019-12-24 09:53:26    阅读次数:59
1155条   上一页 1 ... 5 6 7 8 9 ... 116 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!