i need help

This is a discussion on i need help within the C++ Programming forums, part of the General Programming Boards category; I'm new to programming in c++. I was having problems finding a command that makes a function stop in a ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1

    i need help

    I'm new to programming in c++. I was having problems finding a command that makes a function stop in a loop if it doesn't fall inside the if parameters. Can someone let me know the command or where i can find it. Thank you

  2. #2
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    523
    you can use break to 'break out of a loop'.

    Code:
    while(1)
    {
         if(we want to leave loop)
              break;
    }
    All spelling mistakes, syntatical errors and stupid comments are intentional.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21