Author Topic: Default main.cpp  (Read 7539 times)

TimGradwell

  • Guest
Default main.cpp
« 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
« Last Edit: January 02, 2007, 02:06:42 pm by TimGradwell »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Default main.cpp
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

TimGradwell

  • Guest
Re: Default main.cpp
« Reply #2 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Default main.cpp
« Reply #3 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.
« Last Edit: January 02, 2007, 05:56:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

TimGradwell

  • Guest
Re: Default main.cpp
« Reply #4 on: January 02, 2007, 06:01:55 pm »
Yep, found it in the Wizards folder.

Thanks.

Tim