Forum: C Aug 31st, 2009 |
| Replies: 2 Views: 225 You can't assign anything inside a structure declaration. A structure declaration just defines a type. It's like a blueprint; you're telling the compiler, "if I ask you to create a Something, this is... |
Forum: C Jul 22nd, 2008 |
| Replies: 2 Views: 510 You could save the numbers as you find them instead of printing them, say in a char array, and then print that array in reverse. On the other hand, it would probably be better to use a different... |
Forum: C Jul 16th, 2008 |
| Replies: 10 Views: 966 GCC doesn't like your code.
sort.c: In function ‘read_list’:
sort.c:13: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int *’
sort.c: In function ‘insert_sort’:
sort.c:75:... |
Forum: C Oct 20th, 2007 |
| Replies: 6 Views: 1,467 gotoxy() is an ancient Borland function. It's very unportable. No new code should use it or anything from <conio.h>, such as getch() or clrscr().
'a' is a single character. "a" is a string. Use... |
Forum: C Oct 13th, 2007 |
| Replies: 9 Views: 1,048 It recommends Miracle C! . . . Miracle C is a very broken compiler, a very bad thing to recommend to new programmers. |
Forum: C May 31st, 2007 |
| Replies: 6 Views: 8,988 Also see this FAQ: http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048865140&id=1043284351 |
Forum: C Sep 14th, 2006 |
| Replies: 50 Views: 8,394 As andor mentioned:
Why not to use fflush(stdin): FAQ > Explanations of... > Why fflush(stdin) is wrong (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1052863818&id=1043284351)
What to... |
Forum: C Sep 14th, 2006 |
| Replies: 9 Views: 1,785 This page covers it a bit more thoroughly: http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1047673478&id=1043284351 |
Forum: C Aug 10th, 2006 |
| Replies: 5 Views: 10,816 (source[pos] >= '0' && source[pos] <= '9')
Look into isdigit() in <ctype.h>. And isalpha() or isupper()+islower() for the other lines nearby.
Have you every used getenv() before? . . . if not,... |