User forums > Using Code::Blocks

Default main.cpp

(1/1)

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?

--- End quote ---
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.

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:

--- 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

--- End quote ---

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.

TimGradwell:
Yep, found it in the Wizards folder.

Thanks.

Tim

Navigation

[0] Message Index

Go to full version