"A" <A@iprimus.com.au> wrote in message news:<3f********@news.iprimus.com.au>...
Ying Yang wrote:
I forgot to add that i would like to do it without using the string data
type if possible.
Why? In C++, you should strive to use std::string whenever possible,
unless there is an overriding reason not to do so. Please explain your
special circumstances. That will help us give an accurate answer.
Brian Rodenborn
I am learning C++ and since alot of code still contains reminants of C, it's
a good idea to learn how to use functions from the older c library before
moving on to the C++ library.
"as well as", maybe, but not "before". As Brian said, you should be
using std::string in your own code unless you have a very good reason
not to (other peeple's avoidance of std::string is not a good reason).
You will encounter C-style strings in other people's code, but you
won't be in a position to be maintaining existing code until you've
learnt the languauge. std::string is fundamental to that.
If you want to learn C, learn C. If you want to learn C++, learn C++.
That will involve learning things like C-style strings their library
functions, but that is an advanced C++ topic.
If you want to learn C and C++ at the same time without confusing
yourself to death, you're braver than I am :)
GJD