[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
 

SV: [CPROG] Funktionen gets()



ANG.: CPROG funk. GETS()

Så vidt jeg erindrer (MED STORE FORBEHOLD) er gets en rutine i DOS som laver
direkte 
BIOS kald (bios intterrupt 16 subfunk 2 (reg: AX = 1602H)). Formålet skulle
være at kunne
hente et keyboard data direkte UDEN om C (+ C++)'s strikse data-kontrol.

Og da WINDROP (pr. definition, og desværre er det rigtigt her (!)) ikke
supporterer DOS -BIOS -kal vil dit system crashe ved kald til den
IKKE-eksisterende 16 bit applikation, som 
kaldes BIOS.  

(Hvis du er skrap til Assembler kan du nul-stille bit 0 i CR-0), derefter
kalde din BIOS og
afslutte med en tilbagevenden til 32 bit, men... Et godt råd: LAD VÆRE,  det
er allerhelv.... kompliceret.)

MVH

Chr

-----Oprindelig meddelelse-----
Fra: Carsten Svaneborg [mailto:sslug@sslug
Sendt: 22. november 2000 17:16
Til: sslug@sslug
Emne: Re: [CPROG] Funktionen gets()


Martin Gausby wrote:
> Hvad er der farligt ved Gets(), og er der alternativer?

Jeg ved ikke hvad gets gør men hvad med

char c;
cin >> c;

eller 

char c[256];
cin.getline(c,256);

mon ikke også

string s;
cin.getline(s);

virker?

-- 
    No matter how fast light travels it finds *
    the darkness has always got there first,  *  Carsten Svaneborg
	     and is waiting for it.           *   zqex at risoe.dk
	-- (Terry Pratchett, Reaper Man)      *


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 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] *