#include<iostream>
using namespace std;
char *ss(char *s)
{
return s+strlen(s)/2;
}
int main()
{
char *p,*s="abcdefg";
p=ss(s);
cout<<p<<' '<<s;
}
输出结果:
#include<iostream>
using namespace std;
char *ss(char *s)
{
return s+strlen(s)/2;
}
int main()
{
char *p,*s="abcdefg";
p=ss(s);
cout<<p<<' '<<s;
}
输出结果: