prog.cpp:9:11: error: ‘::main’ must return ‘int’
void main()
^
prog.cpp: In function ‘int main()’:
prog.cpp:12:32: error: lvalue required as unary ‘&’ operand
func1(&static_cast<double>(ab));//I put & operator infront of static_cast and this works.
^