[問題] 請問這個code為何超過64000就會出錯
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int z(char* ,int);
int main(array<System::String ^> ^args) {
clock_t t1, t2; char arr[1000];
int times;
printf("input=");
gets(arr);
printf("times=");
scanf("%d",×);
t1 = clock();
z(&arr[0] , times);
t2 = clock();
printf("\n------%lf\n", (t2-t1)/(double)(CLOCKS_PER_SEC)); system("pause");
return 0; }
int z(char* arr, int times)
{ static int c = 1;
printf("%s",arr);
c++; if(c<=times){
z(&arr[0],times);
}
return 0;
}
手機排版請見諒
--
Sent from my Android
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.115.204.104
※ 文章網址: https://www.ptt.cc/bbs/Programming/M.1430232184.A.EBC.html
→
04/28 22:49, , 1F
04/28 22:49, 1F
→
04/28 23:23, , 2F
04/28 23:23, 2F
→
04/28 23:33, , 3F
04/28 23:33, 3F
→
04/28 23:33, , 4F
04/28 23:33, 4F
→
04/28 23:50, , 5F
04/28 23:50, 5F
→
04/29 00:13, , 6F
04/29 00:13, 6F
→
04/29 00:31, , 7F
04/29 00:31, 7F
推
04/29 02:16, , 8F
04/29 02:16, 8F
噓
04/29 09:48, , 9F
04/29 09:48, 9F
推
04/29 10:08, , 10F
04/29 10:08, 10F
→
04/29 10:09, , 11F
04/29 10:09, 11F
→
04/29 10:09, , 12F
04/29 10:09, 12F
推
04/30 15:36, , 13F
04/30 15:36, 13F
推
05/05 12:47, , 14F
05/05 12:47, 14F
→
05/05 12:47, , 15F
05/05 12:47, 15F
→
05/05 12:53, , 16F
05/05 12:53, 16F
推
05/05 13:10, , 17F
05/05 13:10, 17F
→
05/05 13:10, , 18F
05/05 13:10, 18F