摘要: 1、编写函数,实现把一个char组成的字符串循环右移n位。如abcdehi,n=2,则hiabcde。示例代码View Code?#include "iostream"using namespace std;const int MAX_LEN = 20;void LoopMove(char* cpStr, int iSteps){ //注意,在整个处理过程中,cpStr的最后字符都没有涉及处理 char cTempArray[MAX_LEN]; size_t szStrLength = strlen(cpStr); size_t in = szStrLength -iSte 阅读全文
posted @ 2013-08-07 16:24 lysxc 阅读(374) 评论(0) 推荐(0) 编辑