#include <string>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
using std::string;
void mystrcpy(char *to,char *from)
{
for(;*from!='\0';from++,to++)
*to = *from;
*to='\0';
}
void mystrcpy1(char to[],char from[])
{
int i=0;
for(;from[i]!='\0';i++)
{
to[i] = from[i];
}
to[i]='\0';
}
int main()
{
char s2[] ="abcdefg",s1[1000];
cout<< strlen(s2)<<endl;
//mystrcpy(s1,s2);
mystrcpy1(s1,s2);
puts(s1);
system("pause");
return 0;
}
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
using std::string;
void mystrcpy(char *to,char *from)
{
for(;*from!='\0';from++,to++)
*to = *from;
*to='\0';
}
void mystrcpy1(char to[],char from[])
{
int i=0;
for(;from[i]!='\0';i++)
{
to[i] = from[i];
}
to[i]='\0';
}
int main()
{
char s2[] ="abcdefg",s1[1000];
cout<< strlen(s2)<<endl;
//mystrcpy(s1,s2);
mystrcpy1(s1,s2);
puts(s1);
system("pause");
return 0;
}