The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
refresh user profile dhinge UNIX for Dummies Questions & Answers 1 04-15-2008 01:46 PM
Refresh ls list on screen (auto-refresh)? skidude UNIX for Dummies Questions & Answers 3 11-13-2007 05:00 PM
Refresh window? JimmyFo AIX 0 08-24-2005 11:33 PM
How to increase refresh rate armen Linux 6 06-11-2005 07:57 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 3 Weeks Ago
MrUser's Avatar
MrUser MrUser is offline
Registered User
  
 

Join Date: Oct 2009
Location: Earth
Posts: 23
ncurses refresh()

i have read in one of links, there its documented
Quote:
The job of printw is to update a few flags and data structures and write the data to a buffer corresponding to stdscr. In order to show it on the screen, we need to call refresh() and tell the curses system to dump the contents on the screen.
but i am using following code

Code:
 int main ()
 {
     char ch;
     initscr();
     printw("Enter a char :");
     ch=getch();
     printw("You Entered '%c' ",ch);
     getch();
     endwin();
     return 0;
}
the code does not have
Quote:
refresh();
but have one getch() extra,its showing out put on the window.

without that getch() the program is getting terminated in falsh so we cant observe the out put .
my question is how its printing o/p on window without refresh().
  #2 (permalink)  
Old 2 Weeks Ago
MrUser's Avatar
MrUser MrUser is offline
Registered User
  
 

Join Date: Oct 2009
Location: Earth
Posts: 23
please reply for this
  #3 (permalink)  
Old 2 Weeks Ago
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,929
As specified in the rules, you're not supposed to bump threads.

A little googling brought me to the curses functions echo() and noecho(), which enable and disable local echo respectively.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0