samedi 18 avril 2015

C++ use default variable definition if not defined

I'm learning C++ and I'm trying to find the C++ equivalent of this bash:



output=${1:-text}


Which is basically, if it's not specified, use a default value.


Aucun commentaire:

Enregistrer un commentaire