Oneself is to learn c + +, please the following problems
Consult about curing large amounts of data into the program to
Such as the original data in EXCEL, about 800 rows, each row 100 column data, first as a character, other listed as double or long
CodePudding user response:
Write code directly
CodePudding user response:
Fyi:
# include & lt; stdio.h>
#include
#include
The FILE * fi * fo;
Unsigned int n;
Int c;
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Void main (int arg c, char * argv [])
{
If (argc<3) {
Cprintf (" Bin2Hex srcfile desfile ");
return;
}
If ((fi=fopen (argv [1], "rb"))==NULL) {
Cprintf (" Can not find the file % s ", argv [1]).
return;
}
If ((fo=fopen (argv [2], "w"))==NULL) {
The fclose (fi);
Cprintf (" Can not create the file % s ", argv [2]).
return;
}
n=0;
While (1) {
C=fgetc (fi);
If (EOF==c) break;
n++;
If (1==n) fprintf (fo, "0 x % 02 x", c);
The else {
If (1==n % 16) fprintf (fo, "\ % n0x 02 x", c);
The else fprintf (fo, "02, 0 x % x", c);
}
}
Fcloseall ();
Cprintf (" OK to Bin2Hex % u bytes. The ", n);
}
CodePudding user response:
Can be used as a resource file to compile to connect to the exe file,
CodePudding user response:
Bin2h any resources generate. H header file, there is a char array,
CodePudding user response:
Why to curing procedure, change to be configured, if in order to improve the loading speed is to consider, but this data is almost can be ignored
CodePudding user response: