Re: Problem with linker
- From: MrAsm <mrasm@xxxxxxx>
- Date: Thu, 07 Jun 2007 15:08:09 GMT
On Thu, 07 Jun 2007 10:48:42 -0400, Joseph M. Newcomer
<newcomer@xxxxxxxxxxxx> wrote:
Default parameters introduce all kinds of problems, especially when overloading comes into
play. Suppose I have
class Someting {
public:
Something(LPCTSTR = NULL);
Something(int);
}
you would think there is no problem, but Something() is ambiguous.
I don't agree. I think you are wrong here, IMHO.
Something() is *not* ambigous, because you have not defined a default
constructor.
It would be ambigous if you wrote also a default ctor.
This would be ambigous (and result in compiler error):
Something();
Something(LPCTSTR = NULL);
Something(int);
Deterministic finalization is fairly important, *especially* with a GC involved. Consider
SomeClass() { open file here, exclusive }
~SomeClass() { close file here }
void SomeFunction()
{
SomeClass();
.. do things
}
But would 'using' C# keyword be useful here?
MrAsm
.
- Follow-Ups:
- Re: Problem with linker
- From: David Ching
- Re: Problem with linker
- From: David Ching
- Re: Problem with linker
- From: Joseph M . Newcomer
- Re: Problem with linker
- From: Doug Harrison [MVP]
- Re: Problem with linker
- References:
- Re: Problem with linker
- From: Tom Serface
- Re: Problem with linker
- From: MrAsm
- Re: Problem with linker
- From: Tom Serface
- Re: Problem with linker
- From: MrAsm
- Re: Problem with linker
- From: Tom Serface
- Re: Problem with linker
- From: David Ching
- Re: Problem with linker
- From: MrAsm
- Re: Problem with linker
- From: David Ching
- Re: Problem with linker
- From: MrAsm
- Re: Problem with linker
- From: Joseph M . Newcomer
- Re: Problem with linker
- Prev by Date: Re: Copying Bitmap
- Next by Date: Re: CStdioFile ReadString Unicode ANSI File
- Previous by thread: Re: Problem with linker
- Next by thread: Re: Problem with linker
- Index(es):
Relevant Pages
|