
826 Additional Information about ANSI and TURBO-C++
cout<<endl<<typeid(i).name();
float f;
cout<<endl<<typeid(f).name();
}
OUTPUT
int
float
Explanation: In the above program, two variables of int (i) and float (f) are declared. Using
the typeid() function, their types are displayed. The output is int, float, that is, the type
of variables (i) and (f).
21.4 THE KEYWORD explicit
The keyword explicit is advantageous in order to declare the constructors of a class as be-
ing explicit. When a constructor is invoked with a single argument, implicit conversion is
carried out. In this operation, automatic conversion is performed. The type of argument taken ...