Code::Blocks Forums

User forums => Help => Topic started by: Manu12x on October 07, 2016, 09:30:09 pm

Title: Add headers to project
Post by: Manu12x on October 07, 2016, 09:30:09 pm
Ok.. i am new to codeblocks, i was using lazarus.
I created a new project file .cbp with a cpp file inside it.
How can i add headers (created by me) into the project? If i do Open "example.h" i can edit it but it tells error while saving.
How can i add the headers to the projects and automatically be opened if i open the project?
Title: Re: Add headers to project
Post by: oBFusCATed on October 08, 2016, 12:23:41 am
Have you tried using Project -> Add files?
Title: Re: Add headers to project
Post by: Manu12x on October 08, 2016, 02:29:07 pm
Have you tried using Project -> Add files?
Yes i tried, i selected the file to open in the "openDialog" and it doesn't show anything.
Title: Re: Add headers to project
Post by: oBFusCATed on October 08, 2016, 04:11:42 pm
This command won't open the file. It will just add it to the project tree in Management -> Projects.
Title: Re: Add headers to project
Post by: Manu12x on October 08, 2016, 10:45:39 pm
This command won't open the file. It will just add it to the project tree in Management -> Projects.
Ok but next time i open the project it only opens the main.cpp.. and so i should open the headers file again..
Title: Re: Add headers to project
Post by: oBFusCATed on October 09, 2016, 12:01:34 am
Codeblocks remembers all opened files on project close and next time it reopens them.
This works fine for me and there is an option which controls this, but I guess it is enabled for you.
So please post the exact steps to reproduce the problem.
And the version you're using.

p.s. you can use alt-o to open files that are part of the project.
Title: Re: Add headers to project
Post by: Manu12x on October 09, 2016, 11:52:54 am
Codeblocks remembers all opened files on project close and next time it reopens them.
This works fine for me and there is an option which controls this, but I guess it is enabled for you.
So please post the exact steps to reproduce the problem.
And the version you're using.

p.s. you can use alt-o to open files that are part of the project.
Ok got it!
I am totally new to Code::blocks with a bit knowledge of C++.
Before code::blocks i was using Lazarus IDE with Free Pascal compiler, pascal language is the best language i know good, but i'd like to learn c++, adding a challenge to my programming way! I'm starting using SDL2 lib.. that's funny