In C ++, the difference between TRUE in upper case and true in lower case is true in lower case.

Source: Internet
Author: User

In C ++, the difference between TRUE in upper case and true in lower case is true in lower case.

1. Differences between TRUE in uppercase and true in C ++
True is of the bool type;
TRUE is int type, which is defined by ms in VC;

C ++ does not allow two functions to be differentiated by different return types


2. Is there any difference between "false" and "FALSE" in MFC?
There are differences. False is a bool value of the byte size. FALSE indicates the BOOL value, and BOOL indicates the typedef int BOOL, which is four bytes in size. Although the values of FALSE and false are both 1, one is four bytes and the other is one byte.


3. What do "DWORD" and "HWND" mean respectively?
DWORD type indicates "dual", which is an integer value of four bytes. In windef. h, DWORD is defined as follows:
Typedef unsigned long DWORD; that is, DWORD is the same as unsigned long.
In the same windef. h file, HWND is defined as follows:
Struct HWND __{ int unused;}; typedef HWND _ * HWND;
That is to say, HWND is a pointer to the HWND _ type, and the type HWND _ is explicit, which is something similar to a placeholder. Simply put, HWND is a pointer used to define the handle of a window.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.