source: CMT/v1r12p20020606/Visual/tistream.cxx @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 574 bytes
Line 
1#include <stdio.h>
2#include <iostream.h>
3
4int main ()
5{
6  char buffer[2048];
7
8  FILE* f;
9  f = fopen ("/lal/CMT/v1r3/temp/fragments/dsw_project", "rb");
10  if (f != NULL)
11  {
12    fseek (f, 0L, SEEK_END);
13    int size = ftell (f);
14    fseek (f, 0L, SEEK_SET);
15
16    cout << "size = " << size << endl;
17
18    fread (buffer, size, 1, f);
19
20    int i;
21
22    for (i = 0; i < size; i++)
23    {
24      if ((i % 16) == 0)
25      {
26        cout << endl;
27        cout << i << "> ";
28      }
29      cout << (int) buffer[i] << ' ';
30    }
31
32    fclose (f);
33  }
34}
35
Note: See TracBrowser for help on using the repository browser.