All pastes #352242 Raw Edit

jackpot

public text v1 · immutable
·published 2007-02-12 18:18 UTC
rendered paste body

int getJackpot(void)
{
int j,l;
//char buf[16]="";

file=fopen("jackpot.txt","at");
fseek(file,0,SEEK_END);
printf("%d länge der zeile\n",l=ftell(file));
fseek(file,0,SEEK_SET);
fscanf(file,"%i",j);

//j=atoi(buf);

printf("%3d  steht in j\n\n\n",j);
fclose(file);
return j;
}

void setJackpot(int add)
{
int j;

j=getJackpot();
printf("add: %d, j: %d\n",add,j);
j=j+1+add;
file=fopen("jackpot.txt","wt");
fseek(file,0,SEEK_SET);
fprintf(file,"%c",j);

printf("j(neu): %d\n",j);
fclose(file);
}