So, I want someone to be able to input a string and have it set to a variable. Can someone tell me how to do this both with any number of characters being allowed(if possible) and with a set number of characters?
So, I want someone to be able to input a string and have it set to a variable. Can someone tell me how to do this both with any number of characters being allowed(if possible) and with a set number of characters?
show me what you've done so far.
"I saw a sign that said 'Drink Canada Dry', so I started"
-- Brendan Behan
Free Compiler: Visual C++ 2005 Express
If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?
Search google for std::string. That's all I'll tell you.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
There's loads of different types and classes for strings that you could use. Do some research.
Thanks for the help guys.