Uppercase true and lowercase true differences in C + +

Source: Internet
Author: User

1.c++ uppercase True and lowercase true difference
True is of type bool;
True is the int type, VC This is the MS own definition;

The C + + rule does not allow two functions to be distinguished by only the return type


Is there a difference between "false" and "false" in 2.MFC?
There is a difference. False is a value of type bool, one byte in size. While false is a value of type bool, BOOL is a typedef int BOOL, four bytes in size. While the false and false values are all 1, one is four bytes and one is one byte.


3. What do the "DWORD" and "HWND" refer to respectively?
The DWORD type represents a "double word", which is a four-byte integer value, and in Windef.h, the DWORD is defined as follows:
typedef unsigned long DWORD; in other words, the DWORD and unsigned long are the same.
Also in the windef.h file, the definition of HWND is this:
struct hwnd__{int unused;}; typedef hwnd__* HWND;
That is, the HWND is a pointer to the hwnd__ type, and the type hwnd__ is obviously something like a placeholder. In a nutshell, an HWND is a pointer that defines a handle to a window.

Uppercase true and lowercase true differences in C + +

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.