+ 2
Are function starting without the key word "function" ?
hi, what is the difference between a function with the WORD function (if there is ???) and a function without the word function , starting with int b () { }; ?
6 Answers
+ 4
In c++ dont exist a keyword for identify functions
+ 1
function is just a name or keyword or you can say identifier.
there is no difference between function name as b and function .
but you should give valid name as it gives good look to coding.
+ 1
no I don't th
+ 1
there is no keyword in c++ for defining functions. but there are other ways of defining function-like objects in c++ that are not covered in the sololearn tutorial, such as lambdas and function objects. the difference between a function and a lambda is that a lambda can bind variables that are in scope, whilst a function canât(maybe iâm wrong and c++ is doing weird stuff, so please correct me if iâm wrong). there are also so called function objects that are objects that overload the () operator and those are also strange. all of these objects can be stored in the type std::function.