Home > Back-end >  Consult about curing large amounts of data into the program
Consult about curing large amounts of data into the program

Time:09-27

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:

reference 1/f, feather flew response:
directly write the code inside the
want to ask what exactly is data curing, we haven't talked about

CodePudding user response:

refer to 6th floor qq_45807301 response:
Quote: reference 1/f, feather flew response:

Directly write the code inside the
want to ask what exactly is data curing, we haven't talked about

Ever heard of the recent emergence of a joke:
An official test scores query website, the code looks something like this:
If name=="a" then
The return of 100;
If name=="b" then
The return of 89;
.
Isn't that put the data directly in the code?
But this is not a tutorial or a official to term

CodePudding user response:

# define
The static const
Enum

CodePudding user response:

Global variables, the data is written to the global variable
Exe files on the tail is also can add data, add after modifying the exe file header structure can
Of course, also want to know their length, loading and although this part is not automatic loading of memory, but he is distributed with exe, you are can be opened and read the read-only,
You can think of, the virus infection is the principle of the exe file,

Not going to do this thing, you are that's not much said, lest out again a juvenile delinquent

CodePudding user response:

refer to 7th floor feather flew response:
Quote: refer to the sixth floor qq_45807301 response:

Quote: reference 1/f, feather flew response:

Directly write the code inside the
want to ask what exactly is data curing, we haven't talked about

Ever heard of the recent emergence of a joke:
An official test scores query website, the code looks something like this:
If name=="a" then
The return of 100;
If name=="b" then
The return of 89;
.
Isn't that put the data directly in the code?
But this is not a tutorial or a official to terms

So data curing is probably my data directly write code inside?

CodePudding user response:

references to the tenth floor qq_45807301 response:
Quote: refer to 7th floor feather flew response:
Quote: refer to the sixth floor qq_45807301 response:

Quote: reference 1/f, feather flew response:

Directly write the code inside the
want to ask what exactly is data curing, we haven't talked about

Ever heard of the recent emergence of a joke:
An official test scores query website, the code looks something like this:
If name=="a" then
The return of 100;
If name=="b" then
The return of 89;
.
Isn't that put the data directly in the code?
But this is not a tutorial or a official to terms

So data curing is probably my data directly write code inside?

I guess it is like this, or how to "cure"?

CodePudding user response:

Ok, I know, thank you for your answer
  • Related