On Wed, Nov 27, 2002 at 12:46:43PM +0100, Lars Gullik Bjønnes wrote: > can you try to change this to: > extension.insert(0u, 1, '.'); > > (or > > extension.insert(static_cast<unsigned int>(0), 1, '.'); > > Hopefully the first one is enough. There are other options as well but > then we are entering ugly-land.
Why? 0u and static_cast<unsigned int>(0) are null pointer constants as much as '0'. string extension(ext); - if (extension[0] != '.') extension.insert(0, 1, '.'); + if (extension[0] != '.') extension.insert(0, "."); vector<string> dirlist; directory_iterator dit("dir"); would be a fix. But you know that, of course... And -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)