DTSCode wrote: |
---|
no, make it a char_t. it doesn't need to be int. we rnt in the c age anymore |
Truesome. Wait, what?
"We aren't in the C age anymore", but you favor
char pointers to
std::string?
I don't use C arrays at all anymore (not in C++ at least).
Because even for small, fixed size, constant arrays, one can use
std::array instead.
2) i still firmly believe that char * is better. |
Believing firmly, versus knowing.
Have you seen this?
http://www.cplusplus.com/forum/beginner/95354/#msg511949
Among other things, it demonstrates concatenation of strings. That is, appending one user-given string to another user-given string. If you rewrite that to use
char arrays you'll run into dynamic memory allocation, and the finer points of array to pointer decay.
In plain English, you'll do a lot of extra work, as opposed to... not doing it.