hii everyone1..
how can i update a text file i,e only one particular record in a file i'm using openGL with vc++ ... my sample code to write into a text file when a store button is clicked is over here..after every 8sec i have to update only x_quad and y_quad how can that be done..is ther any one who can help me out??
case STORE_BUTTON:
fptr=fopen ("target.txt", "w");
fclose(fptr);
fptr=fopen("target.txt","a+");
if(radiogroup_item_id==0)
strng="incomming";
else if(radiogroup_item_id==1)
strng="outgoing";
compute(az,sr,er,strng);
if(no>=1)
{
no=no-1;
if(tid <= 10)
{
fprintf(fptr, "Target id=%d\n", tid);
fprintf(fptr, "%s\n", strng);
fprintf(fptr, "speed=%f\n", speed);
fprintf(fptr, "Azimuth=%d\n", az);
fprintf(fptr, "Heading=%d\n", hh);
fprintf(fptr, "Start range=%d\n", sr);
fprintf(fptr, "End Range=%d\n",er);
fprintf(fptr, "Point: %f, %f\n\n", X_quad,y_quad);
}
else if(no==0 || tid>10)
fclose(fptr);
}
tid++;
break;