Author Topic: Change the new default source code  (Read 4119 times)

Locutus

  • Guest
Change the new default source code
« on: March 10, 2010, 08:59:33 pm »
Hi everyone.  First of all, I have been using Code::Blocks sor some time now and I love it.  It's, in my opinion, the best alternative to the VC++ IDE my school uses.  But I have ONE issue I need help with and it follows:
Quote from: Code::Block's default source code
#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    return 0;
}
I'm sure everyone here has seen this.  it is fine with me that it creates a main.c (I'd really like it to be <project name>.c, but I can deal with that) but the default code sucks.  I want it to have something else, or NOT create a new source file at all.  I've changed the default code in the options but still it doesn't change unless I create a new source myself.  The thing is, main.c is still created when I create a new project.  I can create a new source file and remove main.c but the file still is created and still exists.  :x  This is not acceptable to me.  I was wondering if I could change this behavior at all?

The optimal solution for me would be that it creates a new source file named the same as the project with the required default code.  Another solution would be to create a new project without a source file at all.

Can you help me do this?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Change the new default source code
« Reply #1 on: March 10, 2010, 09:14:16 pm »
What about creating an empty project instead of a console application?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Change the new default source code
« Reply #2 on: March 11, 2010, 12:00:49 am »
You can edit the template by right clicking in the dialog -> Edit this script
(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!]