An error that was debugged for half a day yesterday is that the grayscale value is converted from BMP to the height information, and the conversion is from a C ++ code to C, the CPP Code uses a char * pointer to store bitmap data. When I used C #, I didn't think too much about it. I also used char *, and the results were always wrong. I haven't found the reason after an hour. Later I checked and found that the correspondence between types was incorrect. It is a coincidence to find this cause. I originally wanted to convert char * into unsign char *, but the result was not found. In the search process, I found the table in msdn and solved the problem.
See the following:
The following table lists some value types provided by. NET Framework, briefly describes each type, and indicates the corresponding types in Visual Basic, C #, and C ++. The table also includesObjectAndStringClass, which has corresponding keywords in many languages.
Category |
Class Name |
Description |
Visual Basic Data Type |
C # Data Type |
C ++ Data Type |
JScript Data Type |
Integer |
Byte |
An unsigned integer of 8 digits. |
Byte |
Byte |
Char |
Byte |
|
Sbyte |
An 8-bit signed integer. Does not match Cls. |
Sbyte |
Sbyte |
Signed Char |
Sbyte |
|
Int16 |
A 16-bit signed integer. |
Short |
Short |
Short |
Short |
|
Int32 |
A 32-bit signed integer. |
Integer |
Int |
Int -Or- Long |
Int |
|
Int64 |
A 64-bit signed integer. |
Long |
Long |
_ Int64 |
Long |
|
Uint16 |
A 16-bit unsigned integer. Does not match Cls. |
Ushort |
Ushort |
Unsigned short |
Uint16 |
|
Uint32 |
A 32-bit unsigned integer. Does not match Cls. |
Uinteger |
Uint |
Unsigned int -Or- Unsigned long |
Uint32 |
|
Uint64 |
A 64-bit unsigned integer. Does not match Cls. |
Ulong |
Ulong |
Unsigned _ int64 |
Uint64 |
Floating Point |
Single |
Single precision (32-bit) floating point number. |
Single |
Float |
Float |
Float |
|
Double |
Double Precision (64-bit) floating point number. |
Double |
Double |
Double |
Double |
Logical operation |
Boolean |
Boolean (true or false ). |
Boolean |
Bool |
Bool |
Bool |
Others |
Char |
Unicode (16-bit) characters. |
Char |
Char |
Wchar_t |
Char |
|
Decimal |
Decimal (128 bits) value. |
Decimal |
Decimal |
Decimal |
Decimal |
|
Intptr |
The size depends on the signed integer of the basic platform (32-bit platform and 64-bit platform. |
Intptr No built-in type. |
Intptr No built-in type. |
Intptr No built-in type. |
Intptr |
|
Uintptr |
The size depends on the unsigned integer of the basic platform (32-bit platform and 64-bit platform ). Does not match Cls. |
Uintptr No built-in type. |
Uintptr No built-in type. |
Uintptr No built-in type. |
Uintptr |
Class Object |
Object |
The root of the object hierarchy. |
Object |
Object |
Object * |
Object |
|
String |
A fixed-length string of Unicode characters. |
String |
String |
String * |
String |