Can we make a pure function or accessor methods without using return statement?if yes then how? And if no then why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can we make a pure function or accessor methods without using return statement?if yes then how? And if no then why?

if this program is valid then please make a simple pure function without using return statement

30th Jan 2018, 4:27 PM
Harsh Agrawal
Harsh Agrawal - avatar
2 Answers
+ 3
void f(){ cout<<"hello"; }
30th Jan 2018, 5:00 PM
michal
0
make it with pure function
31st Jan 2018, 6:48 AM
Harsh Agrawal
Harsh Agrawal - avatar