[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] key pressed (was: c++ og standard libraries



On Fri, 10 Oct 2003, Erwin S. Andreasen wrote:

> >> http://www.sslug.dk/~chlor/keypressed.c
...
> > Samme princip som dit eksempel bare lidt mere overskueligt
> 
> Den gør dog ikke det samme. getchar() indlæser eet tegn fra stdin, men

Ja, og det er specielt linien med 
  /* do something else */
der interessant i ovenstående eksempel.

Meningen er at man skal gøre noget der tager lang tid, hvilket dog kan 
afbrydes eller ændres af brugeren undervejs.

Men ellers er det rigtigt at det er bedre at bruge ncurses, men nogle 
gange vil man helst ikke det, og så er det at man kan bruge 
ovenstående eksempel.

> Desuden har programmet en fejl: getchar() returner typen "int" og

*koldsved* - jeg troede lige det var i min kode :-)

/hans
-- 
Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079
Schou Industries ApS      http://schou.dk/    CVR: 26 13 44 39
--------------------------------------------------------------
Fundamentally, I would not have pursued SCO's path.
		    -- Ransome Love, former CEO of Caldera/SCO


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *