Answers for "make unique c++"

8

c++ std::unique

sort( vec.begin(), vec.end() );
vec.erase( unique( vec.begin(), vec.end() ), vec.end() );
Posted by: Guest on May-20-2020
0

generating unique id for an object in c++

int id = reinterpret_cast<int>(&obj);
Posted by: Guest on August-09-2021
0

generating unique id for an object in c++

int id = (int)&obj;
Posted by: Guest on August-09-2021

Browse Popular Code Answers by Language