PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Virtual function

< >
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; } };

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

Read more about Virtual function on the web: 1.

HTML of this page generated by Features.ts

hasVariadicFunctions.html 路 hasVirtualFunctions.html 路 hasVoidFunctions.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com