strcpy函数的表达方式:
//把一个char组成的字符串循环右移n个,如:“abcdefghi",n=2,移动后"hiabcdefgh" #include <iostream> #include <assert.h> using namespace std; #define MAX_LEN 20 void LoopMove(char *pstr,int steps) { int n=strlen(pstr)-steps; char tmp[MAX_LEN]; strcpy(tmp,pstr+n); strcpy(tmp+steps,pstr); *(tmp+strlen(pstr))='