gotoxy statement

This is a discussion on gotoxy statement within the Tech Board forums, part of the Community Boards category; hi guys, i'm a beginner student of programming. is there anyone who can help me in regard of gotoxy statement, ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    2

    gotoxy statement

    hi guys, i'm a beginner student of programming. is there anyone who can help me in regard of gotoxy statement, how can i create a box using the char; (alt 1 7 8) with dimensions 8x8 and centered from a screen..thanks
    Last edited by jteneso; 07-11-2010 at 03:27 AM.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,918
    I would recommend against using it. It's not portable.
    I assume you're using C, yes? It is definitely possible to do this using regular printf.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    2

    Smile gotoxy

    hi yes i'm using c, can you pls give me example for this...thanks a lot

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,918
    Code:
    printf("*****");
    printf("*   *");
    //etc
    If you want, you can do it with loops. Then you need a working logic. But that isn't so difficult.

    This is just a basic example. You'll have to adapt it to exactly what you want (which is not so clear, btw).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,236
    Although beginners should know at some time what is portable and not, I think there is no problem to use gotoxy().

    jteneso, anytime you needed to know how to use a function you may read its documentation. For example Borland Manual. If you didn't understand something, people here will help you.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,181
    Quote Originally Posted by siavoshkc
    Although beginners should know at some time what is portable and not, I think there is no problem to use gotoxy().
    I agree, since there is nothing in the C standard library that does what gotoxy() does. The feature is simply not portable, so if you need to use it, you need to use it.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Tic Tac Toe movement
    By $l4xklynx in forum Game Programming
    Replies: 4
    Last Post: 11-06-2008, 07:22 PM
  2. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 06:19 AM
  3. If Else statement problem
    By doofusboy in forum C Programming
    Replies: 2
    Last Post: 11-09-2005, 07:18 AM
  4. Is gotoxy ansi?
    By MeneLaus in forum C Programming
    Replies: 2
    Last Post: 05-18-2002, 03:48 PM
  5. Uh-oh! I am having a major switch problem!
    By goodn in forum C Programming
    Replies: 4
    Last Post: 11-01-2001, 04:49 PM

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