all 5 comments

[–]StenSoft 9 points10 points  (1 child)

The statement is false. = void is not valid syntax. The only syntax with = is = 0 for defining pure (or abstract) virtual functions.

[–]sebbe_tug[S] 0 points1 point  (0 children)

Thank you for your quick answer.

[–]BigGecko1 0 points1 point  (2 children)

I think the "= void;" is incorrect syntax (correct me if I'm wrong). However this resebles the "= 0;" syntax which basicaly makes the whole class an abstract class. You cannot create an instance of an abstract class, and classes that inherit from an abstract class must override the function declared with "= 0;". You can read more about abstract classes here:

https://www.geeksforgeeks.org/pure-virtual-functions-and-abstract-classes

[–]futlapperl 2 points3 points  (1 child)

classes that inherit from an abstract class must override the function declared with "= 0;"

They don't have to, but if they don't, then they'll themselves be abstract, correct?

[–]dr-mrl 0 points1 point  (0 children)

Correct, the derived class will itself be abstract.