answersLogoWhite

0


Best Answer

Static member functions, member function templates and constructors cannot be virtual.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Static member methods, member function templates and constructors cannot be virtual.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What types of functions cannot be made virtual?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Can a static function be made virtual?

No. Virtual functions are invoked according to the runtime type of the object. That is; the most-derived override is automatically invoked even when the runtime type of the object cannot be determined at compile time. This is achieved through the object's virtual table. Static methods do not have any object associated with them; they can be invoked even when no object of the type exists. Without an object, there can be no virtual table. Thus static functions cannot be virtual. They are mutually exclusive concepts.


What is a pure virtual member function in c plus plus?

Functions in C++ are separate procedures or subroutines within a program, that can be called as often as required and which can return values back to their callers. That is, when you make a function call, execution passes to the function and then returns to the caller. Functions that are class members are also known as member functions, member methods, or simply methods. These work exactly the same as external functions except they are scoped to the class and have access to private members of the class.


What are types of man made resources?

types of human made resources


What is pure virtual functions?

In C++, a pure virtual function is a function declaration that has no implementation in the class where it is declared, but is rather left to the child classes to override and define the function. This means that the parent class cannot be instantiated. In Java this is known as an abstract class or interface.


What cannot be made without plastic?

Things that do not have long chain moleculesin general cannot be made to plastic. Buteven milk & starch can be made into plastic.

Related questions

Can a static function be made virtual?

No. Virtual functions are invoked according to the runtime type of the object. That is; the most-derived override is automatically invoked even when the runtime type of the object cannot be determined at compile time. This is achieved through the object's virtual table. Static methods do not have any object associated with them; they can be invoked even when no object of the type exists. Without an object, there can be no virtual table. Thus static functions cannot be virtual. They are mutually exclusive concepts.


What are 3 types functions of cells found in blood and where are they made?

Red / White /Plasma/ Platets


What is a pure virtual member function in c plus plus?

Functions in C++ are separate procedures or subroutines within a program, that can be called as often as required and which can return values back to their callers. That is, when you make a function call, execution passes to the function and then returns to the caller. Functions that are class members are also known as member functions, member methods, or simply methods. These work exactly the same as external functions except they are scoped to the class and have access to private members of the class.


But they made a virtual villagers 4 when will they make virtual vlillagers 5?

virtual villagers 5 has already been made. it is called virtual villagers new believers.


How do you find Pokemon Emerald for Virtual Boy?

No pokemon games were made for the virtual boy.


What types of adaptations are made for insects to perform different functions?

i) the shape of its proboscis; ii) the pattern of spots/etc. on its wings and or body; iii)


A virtual tower of the taj mahal?

a virtual tajamahal is being made up in BANGLADESH IT IS RED in colour


Is leaf a organism?

Yes, a leaf is considered an organ. It is made of several types of tissues, so it cannot be tissue itself.


Can you have virtual constructor?

The short answer is no, you cannot. The long answer is that constructors are not functions that can be called directly, and overriding a base class constructor would have no practical meaning since the derived class is itself responsible for calling its own base class constructors (whether implied by omission or explicitly via the derived class' initialisation list). Even so, the derived class isn't calling the base class constructor directly (that's why constructors have no return value; the actual call is made behind the scenes). The base class itself may be derived in which case its base class must be constructed before it can be constructed. This is the complete reverse of how a virtual function behaves, and is the reason that destructors can be virtual but constructors cannot. When a base class is destroyed, all its derivatives must be destroyed first, starting with the most-derived class of object. This can only be achieved through virtual destruction.


Why are complex organisms made up of specialized cells?

Complex organisms need cells that perform many different functions. Complex organisms are capable of a lot of different things, and that variety needs to be supported on the cellular level. Without them, complex organisms cannot perform different functions.


How are virtual worlds made?

Buy huge companies


How can you play riven on windows xp?

Use Microsoft Virtual PC, install a pre-made Windows 98 virtual machine, and then install Riven on the virtual machine. See http://digiex.net/applications/1022-digiex-exclusive-premade-windows-98-virtual-machine-use-older-games.html for links to MS Virtual PC and the pre-made Win98. Installation is easy, and it works flawlessly.