For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > August 2006 > difference between printf( ) and printw( )









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author difference between printf( ) and printw( )
Subhash

2006-08-22, 7:59 am

Hi all,

can i know the difference between printf( ) and printw( )
when iam using both in one program, it is giving some problem

And also i don't know the difference between getch( ) and getchar( )

give me difference plz...

Regards/-
Subhash.

James Carlson

2006-08-22, 7:59 am

"Subhash" <msubhashreddy@gmail.com> writes:
> can i know the difference between printf( ) and printw( )
> when iam using both in one program, it is giving some problem


printf() prints to standard output. printw() is used in
libcurses-based programs, and prints to 'stdscr', which is the
standard (main) screen.

> And also i don't know the difference between getch( ) and getchar( )


getch() is curses, getchar() is standard I/O.

Are you using libcurses? If so, then you'll likely want to use the
curses functions for doing I/O. If you're not using libcurses, then
you definitely don't want them.

--
James Carlson, KISS Network <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com