Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Whats is a toString() in c++? example code: class RGBColor { short red; short green; short blue; std::string name; public: RGBColor(std::string n, int r, int
Whats is a toString() in c++?
example code:
class RGBColor { short red; short green; short blue; std::string name; public: RGBColor(std::string n, int r, int g, int b); short getRed() const; short getGreen() const; short getBlue() const; std::string getName(); *** std::string toString();***im stuck here
Whats the purpose of this? Do I use this as a get and set method in my class? how do i respond to this tostring() in my code?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started