[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 Thu, 9 Oct 2003, Christian Treldal wrote:

> Jeg prøver famlende at tilegne mig færdigheder i c++ programmering,

Jeg ved ikke hvon man gør i C++.

> Jeg er især interesseret i at finde ud af hvilken tast man trykker på,
> kbhit() er tilsyneladende noget Borland har fundet på, hvad benytter GCC?

c = getchar(); /* er måske noget du søger */

men den er pokkers besværlig at bruge, så jeg har lavet et eksempel:
http://www.sslug.dk/~chlor/keypressed.c

Hvis du vil stoppe dit program og enten vente på at en fil kommer med 
data eller der bliver trykket på en tast, så skal du nok bruge noget 
med select(2). Jeg har også et eksempel med det.

/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] *