like in python we have ,say, type(4)
How to get datatype of a variable as output
typeof(x) is used to get the type of variable x
sorry it is not typeof()
instead it is
cout << typeid(variable).name() << endl;
Code
actually typeof is used in Javascript
in c++ these methods are not useful because here you have to define the variable with it’s type (it’s compulsory) so you always know the type of variable
Thank You! It`s the best TypeID guide i have ever seen