Thanks for quick reply weaknessforcats ,
but declaring the function this way:
how can I pass parameters to the Logger class?...
User Profile
Collapse
-
No match for operator<< when using std::endl
When compiling the below I get the following error:
no match for 'operator<<' in 'log << std::endl' main.cpp
Why can't I use std::endl in my class?
...Code:#include <iostream> class Logger { public: template <typename T> Logger& operator << (const T &t) { // do sth
No activity results to display
Show More
Leave a comment: