help with outtextxy function

This is a discussion on help with outtextxy function within the C Programming forums, part of the General Programming Boards category; HELP WITH OUTTEXTXY FUNCTON How can i pass the direct integer values to outtextxy?...

  1. #1
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92

    Question help with outtextxy function

    HELP WITH OUTTEXTXY FUNCTON
    How can i pass the direct integer values to outtextxy?
    AbHHinaay

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Never heard of it.
    What compiler and operating system are you using?

    My best guess is that you want to print some text at a certain x,y cursor position. If using windows then read the FAQ.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    If it's this type of function, you'll need to put the int into the character string first. To do this, you could use sprintf().
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    Here's a reproduced example I was working on before Hammer.
    Code:
    #include <stdio.h>
    #include <windows.h>
    
    void OutTextXY ( int x, int y);
    
    int main ( void )
    {
    	OutTextXY( 0, 45, "Hmm" );
        	return 0;
    }
    
    void OutTextXY ( int x, int y, char * text )
    {
        	COORD coord;
        	coord.X = x;
        	coord.Y = y;
        	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
        	printf(text);
    }
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 04:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 07:54 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

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