int main( int argc, char** argv) { int result = 0; for(int c = 0; c < NUMBER_OF_MAIN_RUNS; ++c) { char** the_real_argv = new char*[argc]; for(int i = 0; i < argc; ++i) { the_real_argv[i] = strdup(argv[i]); } int the_result = actual_main(argc, the_real_argv); for(int i = 0; i < argc; ++i) { delete the_real_argv[i]; } delete[] the_real_argv; result += the_result; } return result; }
void* start_routine(void* varg) { struct arg* cv = (struct arg*) varg; int actual_main(int argc, char* argv[]); fprintf(stderr,"***3\n"); (void) actual_main(cv->c, cv->v); fprintf(stderr,"***4\n"); return NULL; }
int _tmain(int argc, TCHAR* argv[]) { for (int d = 1; ; d *= 2) { printf("%d\t", d); float time = 0; //us int times = 0; while (time < 1e4) { time += actual_main(argc, argv, d); times += 1; } printf("%f \n", time/times); } return system("pause"); }
int main(int argc, char* argv[]) { return actual_main(argc,argv); }