| |

VerySource

 Forgot password?
 Register
Search
View: 1137|Reply: 5

How to add the header file written by yourself to the VC system?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Serbia

Post time: 2020-10-10 09:00:01
| Show all posts |Read mode
I wrote some functions myself, and want to add them to the compilation system, so that when programming, you can call them just like iostream etc. just by adding #include<header file>?
Reply

Use magic Report

2

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-10-10 09:15:01
| Show all posts
Put it in the include folder in the installation directory.
For example: ..\Program Files\Microsoft Visual Studio\VC98\Include
Or: ..\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include
Reply

Use magic Report

0

Threads

36

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-10-10 10:15:01
| Show all posts
Add the path of the file header you want to add above the VC configuration path
Reply

Use magic Report

0

Threads

36

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-10-10 10:30:01
| Show all posts
Tools->Option->Directories->Show directory for->include files
Then add your own header file path below, you can use #include<> elsewhere to use your own defined header file
Reply

Use magic Report

0

Threads

14

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-10-10 11:15:01
| Show all posts
There are 3 methods
1) Aslklklksaid, the simplest and most commonly used one
2) Project->setting->c/c++->Preprocessor->additional include directories
3) Assjtwenzhousaid, but this method is generally not used
Reply

Use magic Report

0

Threads

41

Posts

28.00

Credits

Newbie

Rank: 1

Credits
28.00

 China

Post time: 2020-10-10 11:30:01
| Show all posts
It’s better to use thelklklkmethod and make a folder for your own header files
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