Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default template in Code Blocks

Tags:

codeblocks

I want to set a default template code in code blocks. How can I set a default code in code blocks which appears every time when I open a new project or empty file.

like image 735
Tanmoy Datta Avatar asked Oct 27 '25 09:10

Tanmoy Datta


2 Answers

Create normally a new project and customize it with the code you want and then go to File > Save project as template. Now, whenever you want to use that template as the initial structure for your project, you go to File > New > From template... and choose it.

like image 127
nbro Avatar answered Oct 30 '25 15:10

nbro


For a default Template in codeblocks.

Goto

Settings > Editor > Default Code

Here select the type of file as C/C++ source file. Now paste your template into this and save it. From now on whenever you create a new C/C++ file this template loads by default.

Happy coding!

like image 22
csgeek Avatar answered Oct 30 '25 15:10

csgeek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!