Thread: If Statement

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    59

    If Statement

    Hi All,

    Just got a quick question,

    If it possible to find out if there is a value in a certain location?

    for example

    Code:
    if (gotoxy(1,5) == number)

    in other words can gotoxy be used to find a variable?

    i cant try it cos im at work and have no compiler.

    This is just one of my whacky ideas!!

    Cheers guys
    Boon

  2. #2
    root
    Join Date
    Sep 2003
    Posts
    232
    >in other words can gotoxy be used to find a variable?
    No, but other conio.h (assuming you're using that) functions can be used to read from the screen buffer. Provided you know the coordinates you can use this:
    Code:
    #include <conio.h>
    
    int gettext(int left, int top, int right, int bottom, void *buffer);
    The information given in this message is known to work on FreeBSD 4.8 STABLE.
    *The above statement is false if I was too lazy to test it.*
    Please take note that I am not a technical writer, nor do I care to become one.
    If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
    Don't assume that I'm ever entirely serious or entirely joking.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    59
    thanks alot

    Boontune

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 05:19 AM
  2. Meaning of this statement?
    By @nthony in forum C Programming
    Replies: 7
    Last Post: 07-16-2006, 02:57 AM
  3. if/break statement
    By Apropos in forum C++ Programming
    Replies: 7
    Last Post: 02-22-2005, 02:33 PM
  4. string & if statement
    By Curacao in forum C++ Programming
    Replies: 4
    Last Post: 05-02-2003, 09:56 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