fpos_t - C stdio.h

C examples for stdio.h:fpos_t

Type

data type

From


<cstdio>
<stdio.h>

Description

Represent a position within a file

Demo Code

#include <stdio.h>

int main ()/*from   www.  jav a2  s .c  o m*/
{
  FILE * pFile;
  fpos_t position;

  pFile = fopen ("main.cpp","w");

  fgetpos (pFile, &position);

  fputs ("That is a test",pFile);

  fsetpos (pFile, &position);

  fputs ("This is another test",pFile);

  fclose (pFile);

  return 0;
}

Related Tutorials