Basic Examplesuggest change
This example just illustrates how this keyword can be used.
int a = 10; // Assume that type of variable 'a' is not known here, or it may // be changed by programmer (from int to long long, for example). // Hence we declare another variable, 'b' of the same type using // decltype keyword. decltype(a) b; // 'decltype(a)' evaluates to 'int'
If, for example, someone changes, type of ‘a’ to:
Then the type of variable
b now automatically becomes
Table Of Contents