Possible Duplicate:
C++ Overriding… overwriting?
What’s the difference between override and overwrite? I’ve heard them used interchangeably but I suspect that’s incorrect.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
overrideis a C++11 keyword used to override base virtual method:This lets you make sure that
A::F(int)gets overriden, meaning you are not creating new virtual function.Of course this code won’t compile if the function signature was different.
overwrite is not C++ keyword and it basically means to overwrite some file or text with new one.
The keyword
overridehas been introduced because some times a programmer doesn’t know whether he is overriding or whether he is creating a new virtual method with a different signature.Using that keyword you either get an error or override virtual method.