Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: juncy on November 07, 2012, 12:20:02 pm

Title: a puzzled question about code format
Post by: juncy on November 07, 2012, 12:20:02 pm
Hi guys,
I want to add some project information at the beginning of my .h file.
Of course I set this in the 'Default code' option as follows:
/*****************************************************************************
 * This source file is part of OPTIC                                                                                                       *
 *                                                                                                                                                       *
 *                                                                                                                                                       *
 * This program is free software; you can redistribute it and/or modify it                                             *
 * under the terms of the GNU Lesser General Public License as published by                                       *
 * the Free Software Foundation; either version 3 of the License, or (at                                               *
 * your option) any later version.                                                                                                        *
 *****************************************************************************/

BUT
When I create a .h file, it looks as follows, and I do not know how to deal with this problem.

/*****************************************************************************
 * This source file is part of OPTIC                                         *
 *                                                                           *
 *                                                                           *
 * This program is free software; you can redistribute it and/or modify it   *
 * under the terms of the GNU Lesser General Public License as published by  *
 * the Free Software Foundation; either version 3 of the License, or (at     *
 * your option) any later version.                                           *
 *****************************************************************************/

Any one could help me with it?
Thanks very much!!!
Title: Re: a puzzled question about code format
Post by: gd_on on November 07, 2012, 12:30:04 pm
You have probably used tab characters to generate your code. Try to use spaces only (or convert automatically tab to spaces).

gd_on
Title: Re: a puzzled question about code format
Post by: MortenMacFly on November 07, 2012, 12:50:47 pm
You have probably used tab characters to generate your code.
Wither that, or you use a a non-monospaced font in the editor (i.e. letters don't have the same width).
Title: Re: a puzzled question about code format
Post by: Jenna on November 07, 2012, 12:57:44 pm
And please, please use code-tags for any code.
It's more readable and should avoid the use of proportional (not monospaced) fontsm when shown in the browser.