|
Thank u
this is the answer i was looking for
|
|
|
|
|
I think the voter'd have wanted to give a top '1' vote. just like Rank 1.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Did you hear it as one of the question when being interviewed?
S o h a i l K a d i w a l a
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Nice question
- NS -
|
|
|
|
|
I tried to compile the below code get the error...
class a
{
virtual a()
{
}
};
error C2633: 'a' : 'inline' is the only legal storage class for constructors
- NS -
|
|
|
|
|
NS17 wrote:
error C2633: 'a' : 'inline' is the only legal storage class for constructors
Because the constructor cannot be virtual.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Rinu_Raj wrote: Do any one know about Virtual Constructors ?
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi All
I want to run my program while Booting the system by inserting the program name in the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Here in BootExecute am giving value
autocheck autochk *copyTest
here copyTest is a batch file which consists of a single command
copy C:\Test1.txt D:\Test1.txt
but after restarting the system I donot see file copied.
Please tell me that how to run copyTest batch file while booting
Please reply.
Thanks
|
|
|
|
|
rajeevktripathi wrote: I want to run my program while Booting the system by inserting the program name in the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Why are you not putting it here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
hi friends in MICROSOFT interview i have faced a question why abstract base class is needed? with out any instantiation what is its use ?
I tried to answer for it like its for design perspective,what r the behaviours
(virtual functions)specified in the Abstractbase class can be elaborated in the derived classes...like that the main purpose is its used as interface....
like that ,But he is not satisfied with my answer.
So Any of u can make my answer value added ?
krishna
|
|
|
|
|
It is usefull for polymorphism to provide a uniform way to manage different objects. They all have the same 'interface' but provide different behavior which are coded it the derived classes.
|
|
|
|
|
I doubt that, what is necessity of pure virtual functions?
- NS -
|
|
|
|
|
To force the redefinition in derived class. It is just to protect reusability of the code. It is used so that you (or other developers that will reuse your code) don't 'forget' to provide a definition of a function which is required.
|
|
|
|
|
Yes... I understood. Thank you
- NS -
|
|
|
|
|
hai, can u make more sense ?
|
|
|
|
|
Some quick points
- Abstract Factory Design Pattern
- Code reusability
- Interface driven approach of programming
- Polymorphism
S o h a i l K a d i w a l a
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Code reusability:
how is it possible there is no code to reuse in Abstract base classes
|
|
|
|
|
Krishnatv wrote: how is it possible there is no code to reuse in Abstract base classes
It's not the base class or its existing derivatives in this case that is being "reused".
It's the code that uses the existing derivatives, the calling code (client?).
At least in theory, in practice it depends on whether the design is good or bad.
The use of abstract factories could leave the calling code unchanged if implemented properly.
--
Rog
It's suppose to be hard, otherwise anybody could do it!
|
|
|
|
|
Hi Friend,
Is there any API which convert int(int a) to basic string(string b)?
itoa can convert a(int) to char*(Char *c) and I can get b from c.However is there any other way?
Thanks
|
|
|
|
|
wsprintf(str,"%d",n) is another way
- NS -
|
|
|
|
|
I think he was asking how to convert an integer into a std::string directly
|
|
|
|
|
|
Sorry I am not familar with that...
- NS -
|
|
|
|
|
Yes but that's not a direct conversion. He was asking for a direct conversion, without using a char array.
Something like Format in CString.
Unfortunately I don't know if this is possible.
|
|
|
|
|
this is not possible, because basic_string is at first a template, so for whatever kind of type...
|
|
|
|