C++ Overriding… overwriting?

后端 未结 5 1564
情深已故
情深已故 2020-12-14 19:51

I know what overriding is in C++. But, is there overwriting? If so, what does it mean?

Thanks.

5条回答
  •  伪装坚强ぢ
    2020-12-14 20:36

    The usual distinction I'm familiar with is of overriding and overloading. Virtual functions are overridden. Functions are overloaded when there's a version with same name but different signature (this exists in many languages). In C++ you can also overload operators.

    AFAIK, overwriting is an unrelated concept (overwrite a variable, file, buffer, etc.), and is not specific to C++ or even OOP languages.

提交回复
热议问题