delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/09/19:19:03

From: "Fredrik Persson" <irnman AT rocketmail DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <8hrgn0$e19$1 AT nnrp1 DOT deja DOT com>
Subject: SV: switch
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <5te05.12211$Za1.193667@newsc.telia.net>
Date: Fri, 09 Jun 2000 22:46:25 GMT
NNTP-Posting-Host: 62.20.164.161
X-Complaints-To: abuse AT telia DOT com
X-Trace: newsc.telia.net 960590785 62.20.164.161 (Sat, 10 Jun 2000 00:46:25 MET DST)
NNTP-Posting-Date: Sat, 10 Jun 2000 00:46:25 MET DST
Organization: Telia Internet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

it isnt hard at all u do the same:

string answer;
switch(answer)
{
case "alt 1":
cout<<"bla bla";
break;

and so on...


<kknd_bl AT my-deja DOT com> skrev i
diskussionsgruppsmeddelandet:8hrgn0$e19$1 AT nnrp1 DOT deja DOT com...
> If I use switch , I can only pass numbers (int) to it. How can I pass
> words etc to switch and what should I type after 'case' when I do that?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019