1. SIZEOF is not a function, but a dollar operator; return is not a function, but is just a keyword.
2, Typedef int size;
This statement defines an int synonym, named size. Note Typedef does not create a new type. It only adds a synonym to an existing type. You can use Size in any context that requires Int:
3, if portability is really important to you, then you don't rely on Calloc () initialize the variable to 0.
4. If the flow refers to an update stream to an output stream or recently, the FFLUSH () function sends any data that is not written to the main environment and writes to the file; otherwise, the status is uncertain.
5. On the stack-based system, hackers can be quite easy to assign a string that can be returned to the address in the stack, so that the pointer points to any position in memory, which will make hackers want! What we have to do is never use Gets (). When you accept strings, you can use Scanf (), but fgets () will be better.
6. There are also some programmers write the above function:
(void) Printf ("Hello World! / N");
(void) Scanf ("% D", & value);
Let them abandon the return value of the function.
7. Similarly, you can hide the pointer syntax below:
Typedef char * pstr; int mystrcmp (PSTR, PSTR);
Here will take us to the first TypeDef trap. Standard Functions Strcmp () has two 'const char *' types of parameters. Therefore, it may mislead people like this to declare mYStrCMP ():
Int MyStrCMP (Const PSTR, Const PSTR);
This is wrong, in order, 'const pstr' is interpreted as 'char * const' (a constant pointer to char), not 'const char *' (pointing to a pointer to constant char). This problem is easy to resolve:
Typedef const char * cpstr; int mystrcmp (cpstr, cpstr); // is now correct
8. This statement is not a bit surprising, Typedef is like Auto, Extern, Mutable, Static, and Register, is a storage class keyword. This is to say Typedef truly affect the storage characteristics of the object; it is just on the statement composition, the TypeDef declaration looks like static, extern, etc. variable declaration. The following will be taken to the second trap:
TypedEf register int found_counter; // error
Compiled. The problem is in that you can't have multiple storage class keywords in the statement. Because the symbol TypedEf has occupied the location of the storage class key, the register (or any other storage class key) cannot be used in the TypeDef declaration.
9. The bitmap is divided into bitmap (DDB) (DDB) and bitmap (DIB) (DIB) (DIB) (DIB)-independent depending on the bitmap (DDB) (DDB) (DDB) and the device-independent bitmap (DDB), Both have different purposes. Both have different purposes. Depending on the device's bitmap depends on the device's bitmap (DDB) DDB (Device-Dependent Bitmap) Dependent Bitmap depends on the specific equipment, which is mainly reflected in the following two aspects: specific equipment, this Mainly reflected in the following two aspects: DDBDDB color mode must be consistent with the output device. For example, color mode must be consistent with the output device. For example, if the current display device is if the current display device is 256256 color mode, then the color mode, the DDBDDB must also be 256256 colors, i.e., one pixel is represented by one byte. Colored, that is, a pixel is represented by one byte. The pixel value stored in the bitmap below 256256 is the pixel value stored in the bitmap below the system tuning, which is the index of the system palette, and its color depends on the system palette. The index of the board, its color is dependent on the system palette. The main purpose of DDBDDB is to save a bitmap. The main purpose of the bitmap to be saved is to save the bitmap. The bitmap to be saved can come from the resource bitmap or a result of a drawing. From the resource bitmap, it can also be a result of a drawing. The device-independent of the device-independent bitmap (DIB) Dib (DIB) Dib (DeviceDIPententIndepententBitmap) is mainly reflected in the following two aspects: The following is mainly reflected in the following two aspects: Two aspects: DibDIB's color mode is independent of equipment. For example, one color mode is independent of the device. For example, a 256256 color DIBDIB can be used in a true color display mode, or can be used in a true color display mode, or may be used in 1616 color mode. Use in color mode. 256256 The following color below (including 256256 color)) has its own color table with its own color table, the color of the pixel is independent of the system palette. Table, the color of the pixel is independent of the system palette. Since Dibdib does not depend on the specific device, it can be used to permanently depending on the specific device, so that the image can be used to permanently save. Sexually save image. DIBDIB is typically saved in the disk in the form of a * .bmp.bmp file, sometimes saved in the disk, sometimes saved in the **. Dib.dib file file. The application running under different output devices can be in communication. The application running under different output devices can swap image through Dibdib. Exchange image
10, by macro. All bitmaps loaded by LoadbitmaploadBitmap ultimately apply all bitmaps that are loaded, and DELETEOBJECTDELETEOBJECT clear is removed.