News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Multiple files

Started by kinddavid, July 29, 2015, 07:07:22 AM

Previous topic - Next topic

kinddavid

Hope to you make .h and .cpp files besides the main.cpp in Code Blocks?

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Quote from: kinddavid on July 29, 2015, 07:07:22 AM
Hope to you make .h and .cpp files besides the main.cpp in Code Blocks?
Quote from: oBFusCATed on July 29, 2015, 09:51:24 AM
What? Project?
...I don't even understand the question to be honest.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

kinddavid

When I create a project I have one .cpp . How do I add another or add a .h?

scarphin

menu 'project->add files'?

kinddavid

Thanks for responding. I am not talking about adding preexisting files. I need a blank .h file. I tried the project->add files. It wants me to add a preexisting file. I know this is a very basic problem, but I am literally not finding how to do this.

oBFusCATed

File -> New -> Empty file
File -> New -> File...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

marcelinux

If you have a .cpp file, by pressing F11, C::B switch to .h file or ask you for create one.
I just need learn a little bit more. Thank you for your help.

papagym

I'm not sure if this will help you with multiple files or not.  Your post is not very specific.  But there is a site that has great C++ tutorials on the internet.  It is called Learning C++.  You can search the lesson index there and open the lesson for Multi-files.  This site has is geared toward MSVS users but there in also info on using Code::Blocks there too.

If you don't understand the lesson you can find load of questions and answer by scrolling thru the comments at the end of each lesson.