I have one method which accepts const char *
as shown below -
bool get_data(const char* userid) const;
Now below is my for loop in which I need to call get_data
method by passing const char *
. Currently below for loop uses uint64_t
. I need to convert this uint64_t
to const char *
and then pass to get_data
method.
for (TmpIdSet::iterator it = userids.begin(); it != userids.end(); ++it) {
// .. some code
// convert it to const char *
mpl_files.get_data(*it)
}
Here TmpIdSet
is typedef std::set<uint64_t> TmpIdSet;
So my question is how should I convert uint64_t
in the above code to const char *
?