Is this possible? Can someone share a C++ snippet to do it? I'm not a C++ expert.
Are you planning to sell these tokens? Hire someone who really knows before you messed it up if that's the case. There are many skilled people that can easily exploit poorly coded tokens. Don't sacrifice people's money just because you don't want to spend on other developers.