+ 1
For functions we should use brackets if only 1statement is in the body of function ??
example::int types(int x) { return x*5; }
3 Answers
+ 2
yea, even if only 1
+ 1
you can have one with empty body, its not really usefull tho
unless its a virtual or a pure virtual function and you are working with polymorphism, then its useful
0
hi,
Can't you have function with no body or nothing in the body ?
function Myfunction () {}