Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: TimGradwell on January 02, 2007, 02:04:13 pm

Title: Default main.cpp
Post by: TimGradwell on January 02, 2007, 02:04:13 pm
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
Title: Re: Default main.cpp
Post by: MortenMacFly on January 02, 2007, 04:23:52 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.
Title: Re: Default main.cpp
Post by: 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
Title: Re: Default main.cpp
Post by: stahta01 on January 02, 2007, 05:54:53 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.
Title: Re: Default main.cpp
Post by: TimGradwell on January 02, 2007, 06:01:55 pm
Yep, found it in the Wizards folder.

Thanks.

Tim