随机数
vuser_init() { int id; char *vuser_group; long file; int rnd; srand(time(NULL)); rnd = rand()%100; lr_whoami(&id, &vuser_group, NULL); if (rnd <= 80) { file=fopen("c://test.txt","at+"); fprintf(file,"%d", rnd); fprintf(file,"%d\n", id); fclose(file); } else if (rnd > 80) { file=fopen("c://test.txt","at+"); fprintf(file,"%d", rnd); fprintf(file,"%d\n", id); fclose(file); } return 0; }