How to define function in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to define function in c++

13th Dec 2016, 2:36 AM
Ritik Tanwar
3 Answers
+ 3
or bool
13th Dec 2016, 4:00 AM
Karl T.
Karl T. - avatar
+ 1
int function( int a){ return a+1; }
13th Dec 2016, 6:39 AM
Sandeep Chatterjee
0
returnType nameOfFunction () { } return type can take int, float, char, double or void
13th Dec 2016, 2:51 AM
Papa Samba Traoré
Papa Samba Traoré - avatar