Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Heken on August 28, 2013, 10:02:18 pm

Title: Default main.cpp
Post by: Heken on August 28, 2013, 10:02:18 pm
Is there a way to change the default layout of main.cpp

Code
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

to something else so I don't have to retype what's required for my C++ class over and over?
Title: Re: Default main.cpp
Post by: sorinev on August 28, 2013, 10:32:35 pm
I haven't tried it myself, but have you maybe tried Settings -> Editor -> Default Code?
Title: Re: Default main.cpp
Post by: oBFusCATed on August 28, 2013, 10:36:10 pm
Won't help...

Either modify the template you're using (right click on it in the wizard -> edit script) or save a project as template.
Title: Re: Default main.cpp
Post by: Jenna on August 28, 2013, 10:37:49 pm
That does not work for wizard-created projects.

But you can create a project that fits your needs and save it as user-template ("File -> Save Project as template") and then use it with "File -> New -> from template".
Title: Re: Default main.cpp
Post by: Heken on August 28, 2013, 11:27:40 pm
That does not work for wizard-created projects.

But you can create a project that fits your needs and save it as user-template ("File -> Save Project as template") and then use it with "File -> New -> from template".

That worked, ty.

I just had it saved in notepad in the main folder list, but this works too :P