#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 100
void main()
{
    FILE *fp;
    if ( (fp = fopen( "d:\\OldRoleID.txt", "r" )) == NULL )
  printf("ERROR!\n");
    int tmp[MAXSIZE];
    int i;
    for ( i=0; i<MAXSIZE; i++ )
    {
        tmp[i] = 0;
    }
    char chtmp[10000];
    i=0;
    while ( !feof(fp) && i!=MAXSIZE )
    {
        fscanf( fp, "%d ", &tmp[i] );
        i++;
    }
    for ( i=0; i<MAXSIZE; i++ )
    {
        printf( "tmp[%3d]=%d\n", i, tmp[i] );
    }
    fclose( fp );
    system("PAUSE");
}