-
What exactly is to be done?
-
XP: In the original Windows XP as well as SP1, the built-in firewall of Windows XP provided good anti-hacker protection. Windows XP's SP2 greatly improves firewall protection and prevents malicious programs from accessing the network, but it is still relatively simple for business applications, so many security-conscious users still replace it with a more powerful firewall or Internet security component provided by a third party.
Vista: Vista has a firewall similar to Windows XP SP2, but with much improvements. Internet Explorer 7 has an "anti-phishing" feature, but it is known to slow down browsing the web slightly, mainly due to the fact that it is checked through Microsoft's servers, while IE7 and its competitors can only clean up some phishing sites, so there is much to be done in this regard.
The new User Account Control system is designed to protect the user's system, so a warning message will appear before important system settings are changed. However, despite pressing the "OK" button, the user still can't do what they need right away, which is annoying to some advanced users, so they turn off the feature entirely.
Windows has a new "random" layer that makes it more difficult to make changes to the memory configuration in the Vista system, which makes it more difficult to attack malicious**. One of Vista's new technologies, the Kernel Patch Protection (KPP) technology, although the KPP does not prevent all viruses, rootkits or other malware attacks on the system, from a security point of view, KPP adds another layer of protection to the many protective barriers, which is really beneficial for Intel and AMD's new X64 processors.
-
The file with the extension XLS is an Excel file for Office, which is a kind ofBinaries。(Of course, it is not excluded that it is a kind of dog meat sold on the head of a sheep.)Text files, this case is not considered. )
You say you can write in it, it seems that you used fprintf to write the file, yes, but fprintf writes text files, text written in a certain format. The file you output with T is like a comma-separated CSV file, which can be recognized and opened by Excel, yes.
However, fread is a function that reads binary files, and if the file is plain text, of course it is wrong for you to read it with fread, and if the file is binary, you can't read it with fread as you want the struct. If your XLS file is a native binary file of Excel, then it is even less likely that you can read it with fread, and you have to use a special library, such as Microsoft's official Office Com library.
I don't know if you understand the difference between binaries and text files.
Of course, if the xls file you read is the one you wrote in fprintf, please use the fscanf function to read it in the format you wrote it in. Take a look at the fscanf function for yourself, it's similar to scanf.
-
1. After the linked list is saved in the file, is it necessary to associate each element with the linked list again (that is, the address of the next element is assigned to the address variable in the previous element)? Is there an easier way for it to automatically restore the original linked list relationship?
Answer: The relationship of the linked list needs to be re-established, there is no other way, here you only need to re-set, because the linked list is stored in memory, each time the pointer address out of malloc is inconsistent, can not be stored in the file, continue to use next time.
2. Do you need to read the entire file stream from the file to the heap and make a linked list? What if the file size is too large to memory?
A: The information stored in the file is the entire linked list, and you only need to read one struct at a time. In the struct that comes out of malloc, you need to read the value of an index, and then build a linked list with the value of this index, so that the original malloc out of the struct can be released, so that you don't have to worry about the file size and the lack of memory.
Because even if your linked list is long, an int value is enough to represent it. If you are afraid that the int (4 bytes) is not enough, you can use the double type, or even nest it with a linked list.
3. If the entire file is read out to the heap and associated with a linked list, then when the modified file is saved to the file again with fwrite(), is the original record overwritten or pursued later?
A: It depends on how you open the file here. The best way to change it is to modify it at will, which is the most difficult way to take into account the change is the first few bytes.
The easiest way is to simply delete the file and re-establish it, but then you have to read all the data into memory.
If you're going to implement the method in question 2, then question 3 is a lot of modifications.
-
1. You can save the linked list throughout the whole process without deleting it, and then delete the linked list until the end of the main program.
2. If the file size exceeds the physical memory, the virtual memory of the operating system will take over in this case, so you don't have to worry about it.
3. It depends on how you open the file. Personally, I recommend opening the file in write mode again, emptying the contents of the original file, and then writing the linked list back again.
Definition of a for loop.
for(the initial value of the variable; termination of operating conditions; The initial value of the first cycle i is 0, and it runs until i=3 stops i=2, and the condition is still satisfied, and the loop body is still executed, and the step size is 1+1 each time >>>More
It's called the [batch] program, in fact, don't think that the program you mentioned above to deal with garbage is really powerful, it's amazing, when you have learned DOS, that program can be said to be a very simple thing; >>>More
2. 1, True 2, False (there is only one program) 3, False (not necessarily) 4, True. >>>More
C++ is an object-oriented language, not very easy to learn, because it is more flexible, so there are a lot of problems to consider when doing programs! Because of the direct operation of the hardware, it inherits the advantages of the C language, so it is very efficient, and is generally used for the underlying and embedded systems.
Scope. You static char *chh;
static char *ch1;Although the address pointed to by the two pointers does not change, have you ever wondered whether the memory address they point to has been released, char chc[10]; It's local, the function is out, the lifecycle is over, and you're trying to access it with a pointer in void times(). >>>More