News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Default main.cpp

Started by TimGradwell, January 02, 2007, 02:04:13 PM

Previous topic - Next topic

TimGradwell

Can I change my default main.cpp?

(Also, if this has been answered lots of times before, could anyone suggest how I could have found out the answer without having to post?  I tried searching for "default main.cpp" without luck...)

Cheers,

Tim

MortenMacFly

Quote from: TimGradwell on January 02, 2007, 02:04:13 PM
Can I change my default main.cpp?
Sure. Several ways are possible - here are two of them:
1.)
- save the main.cpp as e.g. "other_main.cpp"
- add the "other_main.cpp" to the project
- remove the old "main.cpp".
2.)
- create a new file, save as e.g. "other_main.cpp"
- add the "other_main.cpp" to the project
- remove the old "main.cpp".
With regards, Morten.
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]

TimGradwell

Hi,

Sorry, what I meant was, can I set a new default?  So every time I start a new C++ project through the wizard, I start with my main.cpp instead of the one that is currently there.

Tim

stahta01

#3
Quote from: TimGradwell on January 02, 2007, 05:48:16 PM
Hi,

Sorry, what I meant was, can I set a new default?  So every time I start a new C++ project through the wizard, I start with my main.cpp instead of the one that is currently there.

Tim

I have never tried it, but I think it is stored in share\CodeBlocks\templates folder; I would backup the whole folder and then try stuff.
Tim S
Note: This applies to nightly builds! I have no idea if it applies to RC2.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

TimGradwell

Yep, found it in the Wizards folder.

Thanks.

Tim