Sponsored Content
Top Forums Programming why constructor cannot be virtual Post 302130036 by amitpansuria on Friday 3rd of August 2007 12:29:58 AM
Old 08-03-2007
why constructor cannot be virtual

helo i read many books but i cant find the proper answer that why
constructor cannot be virtual
can u explain me in simple term that why constructor cannot be virtual
Regards,
Amit
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Constructor problem

Hi guys I am new to these forums but since I am taking a class at college I would appreciate any help that is possible for this program. My instructor said that when its complete the program should be able to store all 3 fields instead of just 1. public class Greeter2Test { public static... (4 Replies)
Discussion started by: woot4moo
4 Replies

2. Programming

how do you handle a constructor and destructor that fail

helo i m new in c++ on linux can u tell me with an simple example that how do you handle constructor and destructor that fail? Regards, Amit (4 Replies)
Discussion started by: amitpansuria
4 Replies

3. Programming

Doubt regarding Copy Constructor and return value

Hi All, I have made the simple following program :- #include <string> #include <iostream> using namespace std; class A{ private: int val; public : A(){cout<<"In A()"<<endl;} A (const A& aa) { cout<<"In copy c'tor"<<endl; } }; A f(... (1 Reply)
Discussion started by: shubhranshu
1 Replies

4. UNIX for Dummies Questions & Answers

Have to log out of a virtual terminal twice in order to exit virtual terminals

Not really a newbie, but I have a strange problem and I'm not sure how to further troubleshoot it. I have to log out of a virtual terminal by typing exit, then exit again as in: woodnt@toshiba-laptop ~ $ exit logout woodnt@toshiba-laptop ~ $ exit logout I DON'T have to do this when I'm... (1 Reply)
Discussion started by: Narnie
1 Replies

5. Programming

c++ object constructor question

I have the following code class Param{ public: Param(int aa, int bb){ a=aa; b=bb; } int a,b; }; void function(Param); int main(){ function(2,3); return 0; } (6 Replies)
Discussion started by: santiagorf
6 Replies

6. Programming

Doubts on C++ copy constructor concept

Hi, If I run the following program class A { public: A() { cout << "default" << endl; } A(const A&) { cout << "copy" << endl; } }; A tmp; A fun() { return tmp; } A test() { A tmp; cout << &tmp << endl; return tmp; } (1 Reply)
Discussion started by: royalibrahim
1 Replies

7. Solaris

Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host

Trying to set or modify the randomly set hostID of a Solaris 10 virtual/guest machine that I installed on a Windows-XP host machine (using Virtual Box 4.1.12). I was able to set/modify the hostname of the Solaris 10 virtual/guest machine during installation as well as via the Virtual Box... (4 Replies)
Discussion started by: Matt_VB
4 Replies

8. Programming

Constructor?

I am learning about C++ and today am reading concepts for Constructor but it seems a bit difficult to grab it fully. Please anyone explain in simple words about Constructor? (1 Reply)
Discussion started by: ggiwebsinfo
1 Replies

9. UNIX for Beginners Questions & Answers

Providing virtual machine priority in kvm based virtual machines

Hi All, Is there any way I can prioritize my VMs when there is resource crunch in host machine so that some VMs will be allocated more vcpu, more memory than other VMs in kvm/qemu hypervisor based virtual machines? Lets say in my cloud environment my Ubuntu 16 compute hosts are running some... (0 Replies)
Discussion started by: SanjayK
0 Replies
statevars(3U)						    InterViews Reference Manual 					     statevars(3U)

NAME
BrushVar, ColorVar, CompNameVar, FontVar, GravityVar, MagnifVar, ModifStatusVar, NameVar, PatternVar - state variable subject subclasses SYNOPSIS
#include <Unidraw/statevars.h> DESCRIPTION
Unidraw predefines several state variable subject subclasses: BrushVar, ColorVar, FontVar, and PatternVar store the graphics state informa- tion their names suggest; GravityVar records whether gravity is in effect; MagnifVar records the current viewer magnification; ModifStatus- Var records whether state-modifying operations have been applied to a component being edited; NameVar stores a string of interest; and CompNameVar is a NameVar that stores a component and keeps track of its catalog name. These variables represent state that is basic to graphical components and state that is often globally accessible in graphics applications. PUBLIC OPERATIONS
BrushVar(PSBrush* = nil) virtual PSBrush* BrushVar::GetBrush() virtual void BrushVar::SetBrush(PSBrush*) ColorVar(PSColor* = nil) virtual PSColor* ColorVar::GetColor() virtual void ColorVar::SetColor(PSColor*) FontVar(PSFont* = nil) virtual PSFont* FontVar::GetFont() virtual void FontVar::SetFont(PSFont*) PatternVar(PSPattern* = nil) virtual PSPattern* PatternVar::GetPattern() virtual void PatternVar::SetPattern(PSPattern*) Each graphics state state variable subclass defines a constructor that takes an initial value for the state it represents and adds operations for assigning and retrieving that state. GravityVar(boolean = false) virtual boolean GravityVar::IsActive(); virtual void GravityVar::Activate(boolean) The GravityVar constructor takes an initial value that specifies whether gravity is on or off. IsActive returns the current value, and Activate changes it to the one supplied. MagnifVar(float = 1) virtual float MagnifVar::GetMagnif() virtual void MagnifVar::SetMagnif(float) The MagnifVar constructor takes an initial value for the magnification factor, and SetMagnify and GetMagnif assign and return the current value. ModifStatusVar(Component* = nil, boolean = false) virtual boolean ModifStatusVar::GetModifStatus() virtual void ModifStatusVar::SetModifStatus(boolean) virtual Component* ModifStatusVar::GetComponent() virtual void ModifStatusVar::SetComponent(Component*) The ModifStatusVar constructor takes a component instance and an initial value as arguments. The ModifStatusVar is responsible for indicating whether the given component is modified. GetModifStatus, SetModifStatus, GetComponent, and SetComponent get and set these arguments. The modification status will be set automatically (in editors that maintain a ModifStatusVar instance) when an reversible operation is performed on the component. NameVar(const char* = nil) virtual const char* NameVar::GetName() virtual void NameVar::SetName(const char*) The NameVar constructor takes a string as an optional argument, while GetName and SetName retrieve and assign the string. CompNameVar(Component* = nil) virtual Component* CompNameVar::GetComponent() virtual void CompNameVar::SetComponent(Component*) virtual void CompNameVar::UpdateName() virtual const char* PartOf() The CompNameVar constructor takes a component as an optional argument. CompNameVar inherits the GetName operation from NameVar; calling GetName returns the name associated with the component that the CompNameVar stores. The GetComponent and SetComponent calls get and set the component. UpdateName updates the string that GetName returns to reflect the component's catalog name. SetCompo- nent calls this operation automatically when it changes the CompNameVar's component. PartOf returns the name of the root component in the CompNameVar component's hierarchy. SEE ALSO
Catalog(3U), Component(3U), Editor(3U), StateVar(3U), pspaint(3U) Unidraw 6 August 1990 statevars(3U)
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy