Thread: What's wrong with this?

  1. #16
    Registered User
    Join Date
    May 2008
    Posts
    55
    I am completely new to this field this is my third program.

    So, can u explain me why shouldn't we use goto.

  2. #17
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Use of goto is generally not recommended because there are more legible alternatives to use instead, like loops. Sure, one or two gotos may not seem that bad, but it makes the program flow jump all over the place makes it more difficult to see what's going on.
    Last edited by robwhit; 06-03-2008 at 01:57 AM.

  3. #18
    Registered User
    Join Date
    May 2008
    Posts
    55
    in this case M can be more than one. So i want o get of that loop and again start the program fro next value.

  4. #19
    Registered User
    Join Date
    May 2008
    Posts
    55
    when i kept found: just above for(j=0........) statement it didn't work.

  5. #20
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Ok, then I would suggest you use flags like zacs7 suggested.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 07-15-2004, 03:30 PM
  2. Debugging-Looking in the wrong places
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-03-2003, 10:50 PM
  3. Confused: What is wrong with void??
    By Machewy in forum C++ Programming
    Replies: 19
    Last Post: 04-15-2003, 12:40 PM
  4. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM
  5. Whats wrong?
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 07-14-2002, 01:04 PM