Generate UUID

    0

    0

    Giovanny Gongora

    Codiga's C++ Recipes

    Generate UUID with Boost library

    #include <iostream>
    #include <boost/uuid/uuid.hpp>
    #include <boost/uuid/uuid_generators.hpp>
    #include <boost/uuid/uuid_io.hpp>
    
    int generateUUID(){
      boost::uuids::uuid uuid = boost::uuids::random_generator()();
      std::cout << boost::uuids::to_string(uuid) << std::endl;
      return 0;
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.