c++類內 operator<<重載和 類外模板operator<<寫法測試: 將short 和 float數據載入

#include <QCoreApplication> #include <iostream> class A{ public:     A& operator << (char ch); }; A& A::operator << (char ch) {     std::cout<<(int)ch<<std::endl;     return *this; } template <class T
相關文章
相關標籤/搜索