Author Topic: Empty file as default C++ source  (Read 10024 times)

Offline hyphen

  • Single posting newcomer
  • *
  • Posts: 5
Empty file as default C++ source
« 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 ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Empty file as default C++ source
« Reply #1 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.
« Last Edit: October 10, 2010, 11:52:10 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline hyphen

  • Single posting newcomer
  • *
  • Posts: 5
Re: Empty file as default C++ source
« Reply #2 on: October 11, 2010, 04:49:40 am »
Is there any shortcut to directly start a predefined empty C/C++ source file.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Empty file as default C++ source
« Reply #3 on: October 11, 2010, 09:50:47 am »
Look at the settings, there was an option for default content in the newly created files...
(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!]

Offline hyphen

  • Single posting newcomer
  • *
  • Posts: 5
Re: Empty file as default C++ source
« Reply #4 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..

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Empty file as default C++ source
« Reply #5 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: ?
(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!]

Offline hyphen

  • Single posting newcomer
  • *
  • Posts: 5
Re: Empty file as default C++ source
« Reply #6 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..

Offline hyphen

  • Single posting newcomer
  • *
  • Posts: 5
Re: Empty file as default C++ source
« Reply #7 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 ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Empty file as default C++ source
« Reply #8 on: October 11, 2010, 01:17:56 pm »
Yes, right click -> edit template 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!]