Andre Poenitz <[EMAIL PROTECTED]> writes: | 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...
Please tell what you find out. | 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... and 8(!) bytes smaller on my box. -- Lgb