[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] getline under en switch



Frank Damgaard wrote:

> In article <sslug@sslug> you wrote:

> Der er helt som det skal, da du jo kører buffered input.
> Så måske:
> 
>    char dummy;
>    std::cout << "Indtast valg : " << flush;
>    std::cin >> valg;
>    std::cin >> dummy; // læs LF, i DOS CR-LF ?
>  ....
> 
> Hvis du altid regner med at have et linieskift, så skal du læse
> liniskiftet. Bedre er måske at anvende ncurses hvis det er input fra
> consol du vil have.

Tak jeg kan godt se problemet.
Jeg er først lige startet på at programmere under linux, og har aldrig haft 
dette problem under Windows.

Det er fra en consol, hvordan læser jeg automatisk LF ind i den dummy ?




Mvh

Dennis


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