The class operators of 'std::cout' and 'std::cin' can use multiple operators; for example:
std::cout << "3 + 2 = " << 5
'"3 + 2 = "' is a string type and '5' is a int type variable. These variables are combined together to form a character array which is output to the console window.
My question to you is how can this be done via editing or overloading only the equivalent 'cout' class in this example, or can it not be done; in which case how have they done it and what is the coding behind the class?
'"3 + 2 = "' is a string type and '5' is a int type variable. These variables are combined together to form a character array which is output to the console window.
Not quite. operator<<() has a few overloads. One of which takes a const char * as the right hand operand. All those overloads return an std::ostream & (a reference to the left hand operand), so it's not that the 5 is converted to a string and then appended to the previous one, it's something more like this: (std::cout <<"3 + 2 = ")<<5;
The overload for C strings merely sends each character to the stream. The overload for integers first converts the integer to a string and then sends that to the stream
editing or overloading only the equivalent 'cout' class
Classes can't be overloaded and std::cout is not a class. It's an object.