8.5 字符指针应用、指针数组

mac2025-03-05  16

实例:编写在字符串中查找某字符的函数

 

编程实现:

#include<iostream>

using namespace std;

char *strchr(char *str,char c)

{

            while(*str!='\0')

            {

              if(*str==c)

                  return str;

              str++;

最新回复(0)