Home > Back-end >  A small program, after running error. With the DEV 5.11 C
A small program, after running error. With the DEV 5.11 C

Time:04-07

#include
#include
#include
#include

using namespace std;

Int main (void) {
Unsigned char c [256] [256].
Memset (c, 0, sizeof (c));
Unsigned short a=0, b=0;
Unsigned d=0;
Unsigned char filename []="";
Printf (" please enter the file path and file name: ");
cin> The filename.//enter the full path will go wrong, just enter the file name is no problem.
CoutThe FILE * fp=fopen (" c:/users/penghao/documents/a2. Bin ", "rb");
The fseek (fp, 0, 2);
D=ftell (fp);
The fseek (fp, 0, 0);
Fread (c, 1, d, fp);
fclose(fp);
Do {
B=0;
Printf (" % u ", a);
Printf (" : ");
Do {
Printf (" % u ", [a] [b] c);
Printf (" ");
B++;
} while (b<256);
printf("\n");
a++;
} while (a<256);
system("pause");
return 0;
}
  • Related