C++ Overriding... overwriting?

Simplicity picture Simplicity · Jan 19, 2011 · Viewed 18.5k times · Source

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

Thanks.

Answer

user197015 picture user197015 · Jan 19, 2011

In C++ terminology, you have overriding (relating to virtual methods in a class hierarchy) and overloading (related to a function having the same name but taking different parameters). You also have hiding of names (via explicit declaration of the same name in a nested declarative region or scope).

The C++ standard does not use the term "overwrite" except in its canonical English form (that is, to replace one value with a new value, as in the assignment x = 10 which overwrites the previous value of x).