A man said:
Hi,
what does the assignment " = 0 "
Equal signs immediately following declarations aren't assignments, it's an
initialization.
signify in the pure virtual function declaration
virtual void f() = 0 ;
It indicates the function is pure virtual. It's just a hack to use the initialization
sequence that wouldn't be valid anything to signify the difference between "pure
virutal" and just "virutal." The other option would be to add a keyword like "pure"
to the language, which people are reticent to do because adding keywords potentially
breaks existing programs that might have used that as an identifier. It's painful
enough dealing with new, delete, and class when moving stuff between C and C++.
what gets the value "0" ?
Nothing really.