| |

VerySource

 Forgot password?
 Register
Search
View: 624|Reply: 3

The elder brother gave pointers to the specific meaning of the code of the header file.

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-5 11:00:01
| Show all posts |Read mode
#if! defined (AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_)
#define AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_

#if _MSC_VER> 1000
#pragma once
#endif // _MSC_VER> 1000
// AddSwitchDlg.h: header file
//
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-5-20 15:15:01
| Show all posts
#if! defined (AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_)
#define AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_

If this macro AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_ is not defined, execute the following statement
Until the corresponding #endif

#if _MSC_VER> 1000 If _MSC_VER> 1000 then add a sentence #pragma once otherwise do n’t add
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-5-24 21:30:01
| Show all posts
#if! defined (AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_)
#define AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_
-------------------------------------------------- ----------------
In order to avoid repeated references to header files

#if _MSC_VER> 1000
#pragma once
#endif // _MSC_VER> 1000
-------------------------------------------------- ----------------
pragma once is only supported by some compilers under WIN32 platform, such as msc. statement only compile once.

I wrote it according to my needs.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-6-4 14:00:01
| Show all posts
#if !defined(AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_)
#define AFX_ADDSWITCHDLG_H__FF1B528B_44B3_4ACD_A66D_739AE81085FB__INCLUDED_
What generated the above two sentences?
Wouldn’t it be written by myself? Compiler generated?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list