( , C ++)) , "". , , ( , , , ). , Myclass int .
, . using typedef, :
using func_ptr = void (*)(Myclass, int);
( ) , :
int a
, .
:
int sum(int a, int b)
() : sum, , , .. int. , , " int", , , OP.
sum - ", ".
To help you break the habit, write, or at least think about functions in the syntax for declaring a new return type:
auto sum(int a, int b) -> int
source
share