strstr 函数介绍
来源:互联网 发布:电缆分层算法 编辑:程序博客网 时间:2024/06/07 06:36
今天突然看到一个以前从来没有用过的函数 strstr ,真是菜,在字符串中找子字符串都是用的string ....
原型是
_CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr);
__cdecl 的应该是 函数的调用约定,好像是规定函数返回时某些动作应该由谁来做。具体的以后深入了解写点东西记录一下。
#include <iostream>#include <stdio.h>#include <string.h>using namespace std;int main(){char a[30]="hello world";char b[5]="wo";cout<<strstr(a,b)<<endl;return 0;}函数的运行结果是 world
0 0
- strstr 函数介绍
- strstr函数
- strstr()函数
- strstr() 函数
- strstr函数
- strstr函数
- strstr函数
- strstr 函数
- strstr函数
- strstr函数
- strstr() 函数
- strstr函数
- strstr函数
- strstr 函数
- strstr函数
- strstr函数
- 函数strstr()
- strstr函数
- bzoj 4864: [BeiJing 2017 Wc]神秘物质 splay
- 【面试】面试题之汽水空瓶子问题
- 1、数据库_把两条记录合并并统计
- 【leetcode】滑动窗口法训练
- Web Service系列之实例之使用urllib发送SOAP POST请求
- strstr 函数介绍
- 例题3-5 生成元
- kettle 连接mysql数据库 问题
- codeforces 405 D. Bear and Tree Jumps 树形dp
- Android使用Handler造成内存泄露的分析及解决方法
- Web Service系列之数组参数
- java数据类型的范围
- 学习记录 蝙蝠算法
- SSL 2299——护卫队