lundi 29 mai 2017

Variables that can be used as data types.

Is there any way in C++ through I can store the data types in the program like (int, char, std::string etc.) in some particular kind of variable and then use that variable instead, in place of the regular data types (for eg: to declare other variables)?

For eg:-

T = some-function("int")
now std::vector < T > is equivalent to std::vector <int> ? 

Aucun commentaire:

Enregistrer un commentaire