Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3AAF3338.2732C4FB@mdh.se> Date: Wed, 14 Mar 2001 10:00:40 +0100 From: Dan Levin X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: CYGWIN Subject: Problem with scanw() in ncurses Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello everybody ! I downloaded Cygwin yesterday and was delighted to find ncurses included ! I started a test with a bigger program that I originally wrote for Linux. It worked out fine - except for one thing. I could not read integers from the keyboard with 'scanw()' ! I was rather surprised, so I made a small test program that focuses on function 'scanw()' in ncurses. This is how it looks: #include #include int main(void) { /* Declare your variables here ! */ int a=0, b=0; initscr(); clear(); printw("\nEnter a number: "); scanw("%d", &a); printw("\n..and another one: "); scanw("%d", &b); printw("\n\nSum equals: %d", a+b); printw("\n\nPress any key..."); getch(); endwin(); return 0; } When I run it - I always get 0 as a result. If I don't initialize the variables 'a' and 'b' - I get a random number instead. I interpret this as the fact that 'scanw()' fails in putting the numbers I enter from the keyboard in 'a' and 'b' ! I've checked with gdb - with the same result ! I've looked through the mail archives without finding a message concerning the same problem. Platform: Win98SE on a DELL OptiplexGX1p I'm rather eager to get ncurses working in Cygwin, since I think it would be a great environment for educational purposes in C/C++ (together with Emacs for Windows)! Anybody got an idea !? Thanks in advance ! /Dan -- Dan Levin Tel 016 - 15 51 37 Institutionen för datateknik Fax 016 - 15 34 60 Mälardalens Högskola email: dan DOT levin AT mdh DOT se Box 325 631 05 Eskilstuna ------------------------------------------------------------------------ "I used to be an idealist, but I got mugged by reality." -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple