Is the only way to stores strings as a variable in C++ is by having an array of type char?
Run.[it]
0
Junior Poster in Training
Recommended Answers
Jump to PostNope, you can store strings however you want. I've seen people use linked lists before, for example. And to support broader character sets, you're not restricted to the char type either. However, the de facto standard string is an array of char/wchar_t or an object of basic_string<char>/basic_string<wchar_t>.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.