|
George_George wrote: But you are not talking about specific to overloading or overriding, but general rules, right?
Not at all. Consider my second example: without overloading, you could write two separate methods - GetSection() and FindOrCreateSection() - but that breaks the abstraction by requiring callers to explicitly specify when section creation is done. Overloading GetSection() to provide a const version that will simply fail if the section isn't found lets you keep the calling code relatively consistent for const and non-const scenarios.
But who is the king of all of these folks?
|
|
|
|
|
Thanks Shog9,
1.
You mean the following scenario will make componet more complex and coupled with caller?
Shog9 wrote: that breaks the abstraction by requiring callers to explicitly specify when section creation is done.
2.
How about overriding? If we change some const property of some overridden methods (return values and input parameters), is that good practice or anti-pattern? Any practical values/scenarios?
regards,
George
|
|
|
|
|
Hi friends ..is thr any doubt on C,C++,MFC .....plz send ur questions to my mail id also ..i ll send my answers...
This is my mail id :
rajugis2007@hotmail.com
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: Hi friends ..is thr any doubt on C,C++,MFC .....plz send ur questions to my mail id also ..i ll send my answers...
This is my mail id :
rajugis2007@hotmail.com
i thought u r buying the OOP & C++ book based on CP comments to u [^], but it seems u bought C++ FAQ book.
|
|
|
|
|
Mr .Rajkumar ..plz dont tease me ..becoz ..i wanna improve skill ..thts wat i am saying ..
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Just curious - Where did you learn this idiotic spelling (becoz, ur, plz,...)?
|
|
|
|
|
mr .cranky did u understood or not?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Yes we can understand, but it is annoying.
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
|
|
|
|
|
u can answer the questions through CP itself. Is n't it?
just curious, do you have MPD (multiple personality disorder), i am seeing you in your signature as raju.k (male), Nisha.S(female), now in Mathen.K(male), i think you are none of them.
|
|
|
|
|
That creature is a retard.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
What we understand when we see txtpeak is that we're dealing with someone who is 8, or at least, acts that way. It's annoying and it makes you look silly.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
There has never been any doubt that there are many VB programmers out there who have doubts about C and C++...
|
|
|
|
|
k guys ..leave it ..if u r interest ..always welcome ..otherwise no need...
k na Mr.rajkumar,cranky,and pallni
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
You are inviting comments like these. Your original post does not make any sense. Nobody knows what you want.
|
|
|
|
|
k ..Mr.cranky .thanks to your replays ..in feature i will be able to follow
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
I recommend buying a book on C++, and one on English. We are an international community, we are pretty forgiving, but your original post made no sense at all, you need to at least be able to communicate your intention if you want meaningful replies.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
But why you dont want to answer to questions on this forum,maybe your answers will be helpful for other members?
|
|
|
|
|
Please stop spamming the message boards with pointless posts.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
No, the doubt keyword was removed with the latest service pack. Thanks for playing, though.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
The lib //aubio.org/beta/win32/ did not include the def, how can I can generate the lib file in order to call it under vc?
if I get the some binary files and dll files in this lib,the binary file(exe )need to call the function in dll, so how can I make it happen?
and anyone can tell me how to use this lib under windows in order to get the runnng result?
|
|
|
|
|
You may use runtime linking [^].
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
|
|
|
|
|
how ?
can you give some example?
|
|
|
|
|
Actually a sample is in the page linked by my previous post.
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
|
|
|
|
|
wendyyue wrote: some binary files and dll files in this lib,the binary file(exe )need to call the function in dll
linking in binary space (binary dll and binary exe) is too technical for me. as far as i understand from the link, aubio.org, the sample exe and the dll already has references to functions, it is build using cygwin and windows binaries are produced using mingw. see this Aubio on Windows[^]
actually the import libraries are generated, u need to build the source.
#include <aubio/aubio.h>
#include <aubio/aubioext.h>
int main( int argc, char** argv )
{
aubio_sndfile_t *foo = new_aubio_sndfile_ro( argv[1] );
return 1;
}
g++ -laubio -laubioext -lsndfile foo.cxx -o a.out
should resolve all linking references.
from Re: linking problems[^]
it is clear from this, that exe is linked to libraries libaubio, libaubioext, libsndfile which resolves the references.
u may get more help from aubio mailing list it seems.
|
|
|
|
|
still can not get it.
can anyone teach me how to run this lib?
|
|
|
|