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
Print if it matches.
Print if it matches.
May 5, 2015 at 8:16pm UTC
tunadinc
(2)
Hello everyone, i am quite new to C++. I have a text file.
a;1
b;2
c;3
What i want is , i want a code that ask me a number, and if it matches with the numbers above, i want code to print the corresponding character of the number. Any ideas?
May 5, 2015 at 8:57pm UTC
keskiverto
(10402)
The idea is to store the number-character pairs in such data structure (container) that it is easy to search for a number.
http://www.cplusplus.com/reference/map/map/find/
Topic archived. No new replies allowed.