News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Change the new default source code

Started by Locutus, March 10, 2010, 08:59:33 PM

Previous topic - Next topic

Locutus

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?

Ceniza

What about creating an empty project instead of a console application?

oBFusCATed

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