c++ - What does C4250 VC++ warning mean? -


What is Visual C + Warning in practical terms? I have read the linked MSDN page, but I still do not have the problem.

The compiler has warned me and if I ignore the warning then what problems can arise?

The warning states that if any weak depends on class operations VBC Virtual action that is implemented in effective , then those operations can change behavior due to the fact that they are bundled in diamond inheritance.

  straight base {virtual int numbers (return) {return 0; }}; Stroke weak: public virtual base {zero print ()} {/ / depends only on the basis, but effective std :: cout & lt; & Lt; Number () & lt; & Lt; Std :: endl; }}; Structure head: Public virtual base {int number () {return 5; }}; Structured derivative: public weak, public key {} int main () {weak w; W.print (); // 0 derived D; D.print (); // 5}  

This is the behavior that specifies the standard, but it can be amazing for programmers of time, weak :: print operation behavior In the hierarchy does not change due to an override method above or below, but rather by the brother class in heritage degree, when called from derived . Note that this is correct from the point of view of the derived point, it is calling an operation that depends on the virtual method implemented in dominant .


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -