Thread: goto()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Casual Visitor
    Join Date
    Oct 2001
    Posts
    350
    goto needs a label like in basic.

    #include <iostream.h>

    void main()
    {
    cout << "\ntest";

    goto label2;

    label1:
    cout << "\nlabel 1";

    goto end;

    label2:
    cout << "\nlabel 2";

    goto label1;

    end:

    cout << "\ndone.";
    }

    gotoxy(y,x) sets the x,y coords in the display.

    Borland

    #include <stdio.h>
    #include <conio.h>

    void main()
    {
    gotoxy(5,12), printf("row 12, col 5");

    }

    or is it col 12, row 5 hmmm

    VC old versions

    #include <graph.h>
    #include <stdio.h>

    void main()
    {
    _settextposition(5,12), printf(" row 5, col 12");
    }
    Last edited by ronin; 10-26-2001 at 01:46 PM.
    I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  2. goto command
    By jhwebster1 in forum C Programming
    Replies: 3
    Last Post: 02-21-2006, 12:32 PM
  3. Does goto have a glitch or...?
    By Blackroot in forum C++ Programming
    Replies: 9
    Last Post: 02-18-2006, 10:40 AM
  4. helpppp
    By The Brain in forum C Programming
    Replies: 1
    Last Post: 07-27-2005, 07:05 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