cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How To Make Program Detect When Certain
How To Make Program Detect When Certain Letter Is Entered?
Oct 19, 2015 at 3:52am UTC
kyotosomo
(2)
Hello I'm writing a program that only starts when the user inputs the letter P or anything that starts with the letter P. How would I go about doing that? Thank you!
Oct 19, 2015 at 4:21am UTC
learningcplusplus898
(33)
depends on input.. or you could use a switch..
1
2
3
4
5
6
7
cout <<
"enter letter p"
; cin >> input;
while
( input ==
'p'
) {
//do stuff
}
Topic archived. No new replies allowed.