New course! Every coder should learn Generative AI!
Try a free lesson+ 2
My template class method returns bad type ?
The template class method "return_self" must return a object of type Class<string> . But, it returns Class<basic_string<char>> . Why, please check out my code https://code.sololearn.com/cWVYRFpN37K4/?ref=app
1 Answer
+ 1
you can pass the Class<Type> argument by const reference,to the operator<< function