#include "stdafx.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char string[20]="dfsfsadf";
int len,i;
len=strlen(string);
for(i=0;i<len;i++)
cout<<string[i];
getchar();
getchar();
}
转载于:https://my.oschina.net/u/1446208/blog/384048