Code::Blocks Forums

User forums => Help => Topic started by: Locutus on March 10, 2010, 08:59:33 pm

Title: Change the new default source code
Post by: Locutus 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?
Title: Re: Change the new default source code
Post by: Ceniza on March 10, 2010, 09:14:16 pm
What about creating an empty project instead of a console application?
Title: Re: Change the new default source code
Post by: oBFusCATed on March 11, 2010, 12:00:49 am
You can edit the template by right clicking in the dialog -> Edit this script