Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c read file content

char * buffer = 0;
long length;
FILE * f = fopen (filename, "rb");

if (f)
{
  fseek (f, 0, SEEK_END);
  length = ftell (f);
  fseek (f, 0, SEEK_SET);
  buffer = malloc (length);
  if (buffer)
  {
    fread (buffer, 1, length, f);
  }
  fclose (f);
}

if (buffer)
{
  // start to process your data / extract strings here...
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #file #content
ADD COMMENT
Topic
Name
9+2 =