On Wed, Nov 27, 2002 at 01:04:19PM +0100, Lars Gullik Bjønnes wrote:
> | Why? 0u and static_cast<unsigned int>(0) are null pointer constants as much
> | as '0'.
> 
> yes, that was what I was afraid of.
> but anyhow, did you try 0u? 

Yes, and it works. I just wonder why. Maybe I should have a look at
integral promotions again...

Andre'
> but I have a feeling that the right fix would be something like:
> 
> string extension;
> if (!ext.empty() && ext[0] != '.')
>         extension += '.';
> extension += ext;
> 
> thus avoiding the whole issue. and imho simpler code too.

Simpler to read anyway...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to