C: Else misplaced. - Printable Version +- (wL) Forums (https://war-lords.net/forum) +-- Forum: Resources (https://war-lords.net/forum/forum-31.html) +--- Forum: Programming (https://war-lords.net/forum/forum-33.html) +--- Thread: C: Else misplaced. (/thread-9732.html) |
C: Else misplaced. - Danger255 - Jan 27 2013 Code: #include "stdio.h" Double post Guys the else done now help me getting out I mean Code: add: So all get printed I want the one I choose ....... GOT THE SOLUTION MYSELF!! RE: C: Else misplaced. - gOdzOOki - Apr 17 2013 This is probably wayyy old but... dude don't use goto's in C. like, never. worse than raping a nun on her birthday. Instead, turn all of those into separate subroutines and call them from within your switching statement. Just curious, but did you come from an assembly background.... or some OOP language? RE: C: Else misplaced. - Danger255 - Apr 21 2013 I no its old and I studied in a book to not to use gotos not even tried oop or assembly langs RE: C: Else misplaced. - gOdzOOki - Apr 22 2013 Yes. Virtually any book on higher level languages will tell you not to use goto's. I asked about assembly because goto's or "branching" is the only way to implement looping constructs. However, if you want to learn C and C derived programming languages... or for any higher level programming language for that matter, you need to learn how to properly use control structures(if-else) and looping constructs (while, for, do-while). Using goto's not only hinders your learning of these language agnostic ideas, it also denies you the ability to learn problem solving techniques that would serve you for a long time to come. Hope this helped! RE: C: Else misplaced. - Danger255 - Apr 24 2013 yes it helped bro and well Yeah I am learning java now I will post difficulties hope u dont mind RE: C: Else misplaced. - gOdzOOki - Apr 28 2013 np |