Typedef allows flexibility in your class. When you want to change the data type in the program, you do not need to change multiple locations but just need to change one occurrence.
typedef <datatype example int or double> value_type
you can give nay name instead of value_type
, but value_type
is normally the standard name.
So u can use typedef like
value_type i=0; //same as a int or double i=0;