+ 1
Difference between virtual and abstract
some time ago i learned Java and there was an abstract declaration is that the same as virtual in C++ if not what are the differences?
4 odpowiedzi
+ 2
An abstract method can't have functions implemented within it, it needs to have only generic declarations that will be overridden by its child.
Now, virtual methods have full functionality on their own and may be overridden or not, as the child demands.
+ 1
so a true virtual Funktion (Funktion() = 0 ;) would be the equivalent?
0
Auf keinen Fall! Abstract, virtual and pure virtual functions are 3 very different things. But you can use all three mixed in the same class in C++ afaik.
0
ok thx