+ 4
Syntax - static_cast<'type to convert'>('original variable'); Eg : int num; float num2; cin>>num2; num = static_cast<int>(num2); Note that static cast can convert anything to anything, so its on you to decide whether the operation can be considered safe or not... Check this out for more info: www.cplusplus.com/doc/tutorial/typecasting
9th Nov 2017, 11:49 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar