| |

VerySource

 Forgot password?
 Register
Search
View: 681|Reply: 2

Why can't my project define a .h file I wrote?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 LAN

Post time: 2020-1-22 12:00:01
| Show all posts |Read mode
I have 4 .cpp files in my project.
I wrote #include "xxxx.h" files in 4 .cpp files.
Why did something go wrong. What's in..obj or something.

It is normal to delete 3 .cpp files. But I need to call this .h file in 4 windows. What is the reason?
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-2-6 12:45:01
| Show all posts
Is there in the header file
#ifndef #define #endif
Reply

Use magic Report

1

Threads

27

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-2-6 23:15:02
| Show all posts
Include it repeatedly.
If one .h already contains the other three
Just write this one
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