[comp.lang.c++] How to fread a long data stream?

zielinski@acfcluster.nyu.edu (12/07/90)

Problem: Using Turbo C++, getting fread to read a large number of 
data points (160,000 short integers). The following structure 
worked in (Microsoft) C, but fails in Turbo C++. It will only 
read 28,928 two-byte data; this corresponds to the remainder of 
160000/65536. 

  long NumPts=160000L;
  long NumRead;
  static short huge x[160000L];
  printf("Array size is %ld\n",(long)sizeof(x));    /* OK up to here */
  Numread=fread(x,sizeof(short),NumPts,file1);  /* only reads 28,928 */

Then tried putting this in header before the #include's :

   #define _SIZE_T
   typedef long size_t;

but printf returns with 0 (error condition?)

If anybody can help a novice at C with what is probably an easy 
problem, I would appreciate it very much. Thanks -

Marek Zielinski  &  Al Hambidge