User forums > Help

Can I automate my #include statements for .h files?

(1/1)

Swiftslide:
Currently when I created a class, Code Blocks automatically places the .h and .cpp files in separate folders (~/include and ~/src respectively). However, the #include statement in the .cpp file only references classname.h, without specifying the path tot the ~/include folder. As I tend to create all my classes at once, it means I have to go into each one and update the statement.
Is there any way I can:

a) Have Code Blocks reflect its file organisation in its #include statements (preferably so that I don't have to set this option for every project)? OR
b) Automatically stop Code Blocks from putting my .h and .cpp files in separate folders, without having to alter the paths manually during class creation?

Any help would be appreciated. It's a minor point, but an annoyance all the same.

MortenMacFly:

--- Quote from: Swiftslide on August 23, 2010, 02:15:59 am ---Any help would be appreciated. It's a minor point, but an annoyance all the same.

--- End quote ---
Please STOP cross-posting.

It's the this post you create on the same topic. I've locked this thread therefore.

Navigation

[0] Message Index

Go to full version