Goto in Functions?

This is a discussion on Goto in Functions? within the C Programming forums, part of the General Programming Boards category; If I use 'begin:' in the beginning of my main section, and I use 'goto begin;' in my functions that ...

  1. #1
    Unregistered
    Guest

    Goto in Functions?

    If I use 'begin:' in the beginning of my main section, and I use 'goto begin;' in my functions that are before my main, would it still work?

    If it does, I can't seem to get it to work...

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,643
    No. Goto only works within a single scope.
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. goto command
    By jhwebster1 in forum C Programming
    Replies: 3
    Last Post: 02-21-2006, 11:32 AM
  2. Does goto have a glitch or...?
    By Blackroot in forum C++ Programming
    Replies: 9
    Last Post: 02-18-2006, 09:40 AM
  3. helpppp
    By The Brain in forum C Programming
    Replies: 1
    Last Post: 07-27-2005, 07:05 PM
  4. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 05:58 PM
  5. Need some help with a basic tic tac toe game
    By darkshadow in forum C Programming
    Replies: 1
    Last Post: 05-12-2002, 04:21 PM

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