C++ Overriding… overwriting?

后端 未结 5 1563
情深已故
情深已故 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:43

    You can overwrite variables, e.g. int a = 0; a = 42; and files (open an existing file for write - if you have permission it will overwrite the existing file contents) if that's what you mean. This has little in relation to overriding. Were you perhaps thinking of overloading?

提交回复
热议问题