Questions Concepts
GitHub icon

Virtual function

Virtual function - language feature

< >
class Animal { public: // Intentionally not virtual: void Move(void) { std::cout << "This animal moves in some way" << std::endl; } virtual void Eat(void) = 0; }; // The class "Animal" may possess a definition for Eat if desired. class Llama : public Animal { public: // The non virtual function Move is inherited but not overridden. void Eat(void) override { std::cout << "Llamas eat grass!" << std::endl; } };
Example from Speedie:
class abc virtual DoSomething (|string| name) behaviour DoSomething printline "hello: $name"

Languages with Virtual function include C++, Speedie, Real-Time Concurrent C

This question asks: Does the language have virtual functions?

Read more about Virtual function on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Traffic Traffic Today Day 305 feedback@pldb.com Logout