Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: hyphen on October 10, 2010, 07:38:33 pm

Title: Empty file as default C++ source
Post by: hyphen on October 10, 2010, 07:38:33 pm
I'm very new to CodeBlocks IDE. My use of CB is just for normal C/C++ file compilation not any project. I do project work in MSVC only.

So I need to get a simple interface which let me code in a default c++ file. ie: after opening CB I want to just click empty file and start writing c/c++ codes. And without saving it I wanna compile and run. C-Free have this facility but thats not free. Anyway to do it in CB ?
Title: Re: Empty file as default C++ source
Post by: stahta01 on October 10, 2010, 11:50:07 pm
Code::Blocks IS NOT a compiler!!!!!!!

So, if you can find a compiler that does NOT require a source file to compile; you might have a chance; I do NOT think a thing like that exists.

Tim S.
Title: Re: Empty file as default C++ source
Post by: hyphen on October 11, 2010, 04:49:40 am
Is there any shortcut to directly start a predefined empty C/C++ source file.
Title: Re: Empty file as default C++ source
Post by: oBFusCATed on October 11, 2010, 09:50:47 am
Look at the settings, there was an option for default content in the newly created files...
Title: Re: Empty file as default C++ source
Post by: hyphen on October 11, 2010, 10:23:52 am
default content in the newly created files

but the newly created file is not saved before user saves it..
Title: Re: Empty file as default C++ source
Post by: oBFusCATed on October 11, 2010, 10:57:20 am
There are 3 ways to save a file:
1. Ctrl+S
2. Toolbar button
3. File->Save

Why don't you want to save your file  :shock: :shock: :shock: :shock: :shock: ?
Title: Re: Empty file as default C++ source
Post by: hyphen on October 11, 2010, 12:08:53 pm
Just for fast programming. As I dont use CodeBlocks for projects, I juts need to use this IDE for some small code check and instant compiling and running. Anyways I got my point, its not possible in CB what Im trying to do. It requires C-Free which servers my purpose well..
Title: Re: Empty file as default C++ source
Post by: hyphen on October 11, 2010, 12:57:16 pm
A simpler way is to open from recent file.

Is it possible to modify any CB script to bind any working of any wizards ?
Title: Re: Empty file as default C++ source
Post by: oBFusCATed on October 11, 2010, 01:17:56 pm
Yes, right click -> edit template script