How would I exactly do this?

Heres what I'm talking about:

src/test.h
src/etc/work.cpp

how can i get src/etc/work.cpp to include src/test.h?

Recommended Answers

All 4 Replies

"../test.h"

"../test.h"

Ahh thanks, but I have one last question:

Is there a neater way to set it up? I know in Java, there is a packaging system, but what about C++?

Copy the .h into the directory with the code.

Is this really that hard to figure out on your own?

Copy the .h into the directory with the code.

Is this really that hard to figure out on your own?

I really never required to do this before, and I need the .h file to stay in src/ folder not the src/etc/ folder (note, src/etc/ is just an example folder)

But thank you for the help. This can be locked/solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.