Differences between true and true in upper case in C ++

Source: Internet
Author: User
1. Differences 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

=======================

======================================
You wrote it wrong ...... The original function declaration is
Virtual bool initinstance ();

Your function declaration is bool, so you need to write it as bool.
Bool and bool are different.

 2. 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 obviously something like a placeholder. Simply put, hwnd is a pointer used to define the handle of a window.

3. 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.

Related Article

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.