既存のクラスの既存の関数/演算子をオーバーロードできますか?
私がやろうとしていたこと:
#include <iostream>
#include <string>
using namespace std;
string& string::operator<<(const string& str) {
this->append(str);
}
しかし、これは私にエラーを与えます:
test.cpp:5: error: too few template-parameter-lists
これどうやってするの?または私はできませんか?