I have a set of entries; each entry contains a unique name (C string). When creating new entry user may provide a unique name for the entry or may not. In case of user not providing a name, I have to generate a default unique name. I wanted to count the number of entries, increment it and use it as index for the new entry's unique name, but this name may already exist. What are some other ways to generate a truly unique name in my case?