cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Making one string another string....
Making one string another string....
Nov 30, 2010 at 5:13pm UTC
monkeyboy
(17)
Hi, Im working on a program where the user inputs one word and the program outputs another ex. user enters: hello, program outputs: ......-...-..---
So my question is how would i convert one string to another?? Anyone?
Nov 30, 2010 at 5:49pm UTC
Galik
(2254)
That rather depends on the relationship between the input and the output.
EDIT:
If the relationship is a straight conversion then a std::map might me useful.
http://www.cplusplus.com/reference/stl/map/
Last edited on
Nov 30, 2010 at 5:50pm UTC
Dec 1, 2010 at 12:20am UTC
taylorc8
(40)
C++ strings are mutable, and they offer quite a bit of flexibility. If you run into problems please let us know.
http://www.cplusplus.com/reference/string/string/
Topic archived. No new replies allowed.