文件名称:5
介绍说明--下载内容均来自于网络,请自行研究使用
1. 编写一个使用指针返回类型的函数,使用该函数在字符串中搜索一个子串,并返回第一个相匹配的子串指针。该函数的原型如下:
输入为3行。第一行为两个整数,表示字符串和需要查找的子串的长度。第二行为字符串,第三行为子串。
输出见main函数。
程序的一个输入输出样例为:
Enter the length of string and substring
10 5
abcdefghij
defgh
find substring:defghij
-1. Write a function that returns a pointer to the type of use, use the search function is a substring in the string, and returns the first match substring pointer. The prototype of this function is as follows: Input for 3 rows. The first acts of the two integer representing the length of the string and the need to find a substring. The second behavior string substring third acts. Output, see the main function. An input and output sample program is: Enter the length of string and substring 10 5 abcdefghij defgh find substring: defghij
输入为3行。第一行为两个整数,表示字符串和需要查找的子串的长度。第二行为字符串,第三行为子串。
输出见main函数。
程序的一个输入输出样例为:
Enter the length of string and substring
10 5
abcdefghij
defgh
find substring:defghij
-1. Write a function that returns a pointer to the type of use, use the search function is a substring in the string, and returns the first match substring pointer. The prototype of this function is as follows: Input for 3 rows. The first acts of the two integer representing the length of the string and the need to find a substring. The second behavior string substring third acts. Output, see the main function. An input and output sample program is: Enter the length of string and substring 10 5 abcdefghij defgh find substring: defghij
(系统自动生成,下载前可以参看下载内容)
下载文件列表
5\10.cpp
.\c++_ch06_10.vcxproj
.\c++_ch06_10.vcxproj.filters
.\Debug\10.obj
.\.....\c++_ch06_10.lastbuildstate
.\.....\c++_ch06_10.log
.\.....\CL.read.1.tlog
.\.....\CL.write.1.tlog
.\.....\link-cvtres.read.1.tlog
.\.....\link-cvtres.write.1.tlog
.\.....\link-rc.read.1.tlog
.\.....\link-rc.write.1.tlog
.\.....\link.read.1.tlog
.\.....\link.write.1.tlog
.\.....\vc110.idb
.\.....\vc110.pdb
.\Debug
5