![]() |
| | #1 |
| Registered User Join Date: Jan 2006
Posts: 100
| setting indentation in dev-c++ By default, it makes things look like your writing in MS Word. Code: if(x)
{
printf();
}
|
| richdb is offline | |
| | #2 |
| Registered User Join Date: Mar 2006
Posts: 726
| Tools -> Editor Options -> Auto Indent.
__________________ Code: #include <stdio.h>
void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
/3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}
|
| jafet is offline | |
| | #3 |
| Registered User Join Date: Jan 2006
Posts: 100
| I already have that selected, but it doesn't change anything. |
| richdb is offline | |
| | #4 |
| Moderately Rabid Join Date: Feb 2005 Location: Milwaukee, WI, USA
Posts: 300
| What is your tab size set to?
__________________ There is a difference between tedious and difficult. |
| Decrypt is offline | |
| | #5 |
| Registered User Join Date: Jan 2006
Posts: 100
| It is set to 2. But playing with it doesn't seem to help. The code doesn't indent in the places it should, and braces don't wrap correctly either. When I write a loop, it comes out looking like this: Code: for()
{
printf();
}
Code: for()
{
printf();
}
|
| richdb is offline | |
| | #6 |
| Even death may die... Join Date: Apr 2003 Location: Malaysia
Posts: 970
| Here are my settings that seem to work okay for me. Auto Indent: checked Use Tab Character: not checked Smart Tabs: not checked Keep Trailing Spaces: checked Backspace Unindents: checked Enhanced Home Key: checked |
| Dante Shamest is offline | |
| | #7 |
| Registered User Join Date: Jan 2006
Posts: 100
| That's alot better. Code: #include <stdio.h>
main()
{
int a=2,
b=10,
c=1,
d=5;
while(a < b)
{
printf("\ntest");
++a;
}
if(a==b)
{
printf("\n\ntest2");
--a;
}
else
{
++c;
++d;
}
getchar();
}
|
| richdb is offline | |
| | #8 |
| Ethernal Noob Join Date: Nov 2001
Posts: 1,891
| Wasn't there a way to select a block of code and press tab or shift tab and it changes the entire indent for that block? |
| indigo0086 is offline | |
| | #9 |
| Registered User Join Date: Jan 2006
Posts: 100
| Yeah, but other compilers do it automatically when you type certain keywords. |
| richdb is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New to Dev C++/<windows.h>... | Cilius | C++ Programming | 3 | 02-23-2005 01:05 AM |
| Glut and Dev C++, Programs not Quitting? | Zeusbwr | Game Programming | 13 | 11-29-2004 08:43 PM |
| Dev C++ Compiler, Indentation? | Zeusbwr | C++ Programming | 3 | 10-21-2004 06:13 AM |
| openGL programming - From MSVC++ to Dev C++ | WDT | Game Programming | 1 | 03-08-2004 05:19 PM |
| Your favourite fantasy game setting? | fry | Game Programming | 4 | 10-16-2002 06:26 AM |