mercredi 26 juin 2019

How to choose dynamicly in C/C++ the type to cast to?

Is there a way to do

if(...)
  return (int)value;

return (unsigned int)value;

by moving the check into the cast to get something like

return (???)value;

Aucun commentaire:

Enregistrer un commentaire