Often we may need to transfer the type itself to a function. Here is the implementation done using an example for determining the size of the variable type using templates. You cannot do this normal way as setting type is a compile time activity. If you use templates you can defer this action for compile time and would give you the ability to determine type during compile time. This is edited using the Visual Studio editor.
No comments:
Post a Comment