What is the best way to programmatically generate a GUID or UUID in C++ without relying on a platform-specific tool? I am trying to make unique identifiers for objects in a
A GUID generator usually relies on hardware characteristics of the machine, usually stuff like MAC addresses or IPs. The only thing you can do which is absolutely platform independent is use some kind of PRNG seeded manually or seeded from some time source. This usually does not generate a true globally unique identifier in the sense that you are guaranteed that no one in the world generates the same number.