If Statement

This is a discussion on If Statement within the C++ Programming forums, part of the General Programming Boards category; Hi All, Just got a quick question, If it possible to find out if there is a value in a ...

  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
    twm
    twm is offline
    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, 06:19 AM
  2. Meaning of this statement?
    By @nthony in forum C Programming
    Replies: 7
    Last Post: 07-16-2006, 03: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, 10: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

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