If else
- From: "Kristoffer Gustafsson" <kg84@xxxxxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Wed, 9 Feb 2011 23:07:40 +0100
Hi.
Now I've decided that I'll learn to do things both without goto, and with it.
Because then I'll maybe discover that goto is bad:)
I got one last code question today.
I need so that my program can do more than one action. for example of writing a
text adventure you want many.
I've managed to put an if statement in my code. for example
if direction=="south";
{
cout<<"you go south.";
}
Now if I want to go north, how can I do that?
I tried if else, but it only says "expected primary expression before else
expected.
Can you help me with this please?
/Kristoffer
Other related posts:
- » If else - Kristoffer Gustafsson
- » Re: If else- Littlefield, Tyler
- » RE: If else- Sina Bahram
- » Re: If else- Kristoffer Gustafsson
- » Re: If else- Littlefield, Tyler
- » Re: If else- Christopher
- » RE: If else- Sina Bahram
- » Re: If else- Littlefield, Tyler
- » Re: If else- Littlefield, Tyler
- » Re: If else- Littlefield, Tyler
- » RE: If else- Sina Bahram
- » Re: If else- Kristoffer Gustafsson
- » Re: If else- R Dinger
- » Re: If else- Littlefield, Tyler
- » Re: If else- Littlefield, Tyler
- » RE: If else- John G
- » Re: If else- John G
- » Re: If else- Alex Midence
- » Re: If else- John G
- » RE: If else- Ken Perry
- » Re: If else- Littlefield, Tyler
- » Re: If else- Littlefield, Tyler
- » Re: If else- Alex Midence
- » RE: If else- Ken Perry
- » RE: If else- Ken Perry
- » Re: If else- Littlefield, Tyler
- » RE: If else- Ken Perry
- » Re: If else- Littlefield, Tyler
- » Re: If else- Alex Midence
- » RE: If else- Ken Perry
- » RE: If else- Ken Perry
- » RE: If else- Ken Perry