Is it possible to use a string with classes? Even if you are using a class specification file and implementation file? I need to have 3 member variables that need to store a string. Or is an array of characters a better fit when it comes to classes?
Rez11
1
Light Poster
Recommended Answers
Jump to PostNot only is it possible, it's recommended that you use the std::string class instead of C-style strings. I imagine you've tried this already and gotten an error, which prompted you to ask an overly generic question when posting your code and asking a specific question will get your problem solved …
All 4 Replies
Narue
5,707
Bad Cop
Team Colleague
Rez11
1
Light Poster
LevyDee
2
Posting Whiz in Training
Rez11
1
Light Poster
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.