By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,409 Members | 893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,409 IT Pros & Developers. It's quick & easy.

what to put in an IF statement?

P: n/a
i'm trying a little app for practice, i'm not sure how to do the IF
statement though
i want people to input their option, say their option is stored in INP1.
their options are yes and no
how would you write in a IF statement to execute the block if the word yes
is chosen?

sorry that's the best i can explain it :P
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Delboy wrote:
i'm trying a little app for practice, i'm not sure how to do the IF
statement though
i want people to input their option, say their option is stored in INP1.
their options are yes and no
how would you write in a IF statement to execute the block if the word yes
is chosen?

sorry that's the best i can explain it :P

#include <string>

// ...

using namespace std;

// ...

string inp1;

// ...
if(inp1== "yes")
// ...

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #2

P: n/a
thanks v much
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.