#include
#include"string.h"
#include"stdio.h"
#include"stdlib.h"
using namespace std;
int main()
{
int i;
char* str;
for (i = 0, str = (char*)malloc(1); (*(str + i) = getchar()) != '\n'; i++)
str = (char*)realloc(str, strlen(str) + 1);
cout << i << endl;
getchar();
return 0;
}
阅读(1088) | 评论(0) | 转发(0) |