Tru*_*eon 5 c++ methods class instantiation this
以下代码是否安全?(我已经知道它编译正确了.)
void Tile::clear() { *this = Tile(); } int main() { Tile mytile; mytile.clear(); }
Cha*_*via 10
它可能会奏效.这取决于如何Tile& operator = (const Tile&);实施.但是,分配*this新值并没有任何本质上的错误.
Tile& operator = (const Tile&);
*this
归档时间:
15 年,2 月 前
查看次数:
893 次
最近记录: