|
Please explain why the error
<br />
class base <br />
{<br />
public:<br />
void fun1()<br />
{<br />
}<br />
<br />
virtual void call()<br />
{<br />
}<br />
};<br />
<br />
class derive:public base<br />
{<br />
public:<br />
void call()<br />
{<br />
fun1();
}<br />
<br />
void fun1(int i)<br />
{<br />
<br />
}<br />
}<br />
Regards
Anil
|
|
|
|
|
Because fun1 in derive hides the definition of fun1 in base . Use base::fun1() , like this:
class base
{
public:
void fun1()
{
}
virtual void call()
{
}
};
class derive:public base
{
public:
void call()
{
base::fun1();
}
void fun1(int i)
{
}
};
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Why the base::fun1() is needed ?
If the fun1(int i) is not there then there is no error.
Once the overload function is declare its giving the error.
Regards
Anil
|
|
|
|
|
_anil_ wrote: Why the base::fun1() is needed ?
If the fun1(int i) is not there then there is no error.
Once the overload function is declare its giving the error.
Did you even read my answer? To repeat what I said - the error's because fun1 in derive hides the definition of fun1 in base. It (fun1 in derive) is not an overload, because it's defined in a different scope than fun1 in base.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Ok Got it. Thanks.
Regards
Anil
|
|
|
|
|
With your fun1(int) in derived class you're hiding the base class fun1 . See here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi I want to make a project on c++ dat will give the beats of tabla in fixed "taala" and "laya" can anyone help me by teachung me how to trap sound using cpp??
|
|
|
|
|
Markandaiya Harsh wrote: I want to make a project on c++ dat will give the beats of tabla in fixed "taala" and "laya"
I'm sorry but I don't understand anything of the second part of your sentence. What is a tabla, a talla and a laya ?
Please, when asking a question keep in mind that we don't have any idea of what you are trying to do. So, try to be as clear as possible when asking your question.
|
|
|
|
|
Hi Cedric,
Tabla[^] is an Indian musical instrument.
Taala and Laya are related with music. To be precise,
taala: the beat set for a particular composition (a measure of time). taaLas have cycles of a defined number of beats and rarely change within a song.
laya : The term for tempo in Indian music.
Now please answer the guy.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hellow,,,
any one know how to make a fuzzy logic code in C and inject it to an AVR ATMega16 mico controller???
thanx lot
|
|
|
|
|
Full code at www.cpallini.free.fuzzy.avr.codez.com.
Or you may prefer to read forum guidelines [^], before posting .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Full code at www.cpallini.free.fuzzy.avr.codez.com.
Sir ,Link does not work
Please its really urgentzzzzz sir..
Regards,
Sandip.
|
|
|
|
|
hi..
I want to write it by codevision ...
can any one help me???
|
|
|
|
|
Hi .. I am using CRichEditCtrl::StreamOut function to get the rtf of richedit control in cstring variable, but its not returning multibyte character(chinese, korean)which i entered as text in richedit control. Is there any flag needs to be set to get this values.
Thanks
amit
|
|
|
|
|
This worked for me:
DWORD __stdcall EditStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
LPCWSTR a = LPCWSTR(pbBuff);
return 0;
}
EDITSTREAM es = { 100, 0, &EditStreamCallback };
rich_.StreamOut(SF_TEXT|SF_UNICODE, es);
The important bit is specifying the SF_UNICODE flag in conjunction with the SF_TEXT flag.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi all,
I am trying to use WM_COPYDATA to implement IPC between my global hook dll and my main application. It works well with almost of applications on Vista except IE7 Protected mode. I successed to call ChangeWindowMessageFilter to allow my main application receive this message from lower integrity processes but my main application still could not receive this message from IE7 if it is running in protected mode. Are there anyone who successed in sending message from IE7 protected mode to higher integrity processes? Please help me!
Thank you and regard.
|
|
|
|
|
Hi all,
I want to create Propertysheet that is having 10 propertys pages.
I want to assign some validation here like every Property page having a edit ctrl the validation is that property sheet sholud not close when user press Ok Button of prperty sheet and anyone edit box is empty
and this gives message box and focus on particular edit box ctrl.
please tell me how can i hanle OK button.
if it is possible in TabCtrl please tell me.
Please explain me with example.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
when you press OK button,you get every propertys pages to check it.
|
|
|
|
|
I'll try this but its not works,or i made some mistake .
if possible please explain me with example.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi,
I am using visual studio 2006.I have written one function called GetID in
my code.I have enabled Breakpoint in this function.But it is Disabling while debugging.
char* EnhancedReport::GetId(char *fileName,int flag)
{
char l_ID1[4];
int k = 0, cnt = 0;
size_t fileNamelen = strlen(fileName);
for(int i=0; i< (int)fileNamelen-1; i++)
{
if('_' == fileName[i])
{
cnt++;
}
if(flag == cnt)
{
l_ID1[k] = fileName[i+1];
k++;
}
}
l_ID1[k-1] ='\0';
return l_ID1;
}
can any one help me.
|
|
|
|
|
hemlat wrote: visual studio 2006
2003, 2005 or 2008. I never heard about a Visual Studio 2006 (or are you talking about VC6 ?)
hemlat wrote: I have enabled Breakpoint in this function.But it is Disabling while debugging.
Are you sure that you are debugging the debug configuration and not the release configuration ? Make sure debugging information is enabled in your build.
|
|
|
|
|
Sorry my mistake.
It is visual studio 2005.
|
|
|
|
|
And ? Did you read the end of my message ?
|
|
|
|
|
yes. I am debugging release configuration.I am new to MFC.
I have changed configuration to debug.Then it is showing Link errors.
|
|
|
|
|
hemlat wrote: yes. I am debugging release configuration
Well, that explains why you don't have brekpoints. No debug information is generated for release configuration.
hemlat wrote: I have changed configuration to debug.Then it is showing Link errors.
Each configuration (release and debug) have their own project properties. Thus, you probably added a link setting in your release configuration and forgot to add it also in your debug configuration. MAke sure that everything you added in the release configuration is also added in the debug configuration.
|
|
|
|