What the freak is putch??? what is it used for????? How do you use it?????
PS:thank you if you helped, and don't say nuttin bout no homework cause it aint
What the freak is putch??? what is it used for????? How do you use it?????
PS:thank you if you helped, and don't say nuttin bout no homework cause it aint
Code:#if _emo #define stereo_type_i_dislike #endif
It's a non-standard function to output one character, unbuffered. The oposite to getch().
zen
int putch(int) is again another nonstandard function. It does the same as putc() or putchar().As far as I can remember it takes an int which it prints as a char.If not successful putch in returns EOF.If successful it returns the int that was passed.
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
simple.
If you are not in graphics mode,
putch('@')
if you are in graphics mode,
putchar('@')
anyway to your question
I know, in your case, your trying to do the thingy with the arrow keys thingy majiggy i think...
well putch or putchar 'Puts' the character to the specified location on the screen. For example:
If you compile and run this there should be an A in the center of the screen, and a B in at the top of the screen. In your case you can simply say printf(), but this has some weird hidden advantages.Code:#include <conio.h> #include <stdio.h> int main(void) { gotoxy(15,10); //Go to the center of the screen putch('A'); gotoxy(0,0); //go to the top of the screen putch('B'); return(0); }
In other words, its printf() or cout, exept it can only print out one character.