You can either use the _id field of class IloCplex::MIPCallbackI::NodeId directly
std::cout << getNodeId()._id;
or define this operator (a more elegant but also more intrusive solution)
inline std::ostream &
operator<<(std::ostream &s, IloCplex::MIPCallbackI::NodeId const &id) {
return s << id._id;
}
With this operator you can then just do
std::cout << getNodeId();
#CPLEXOptimizers#DecisionOptimization