+ 1

What is role of void keyword in declaring functions ???

example if possible !!! [in detail] !!!

13th Jan 2017, 8:22 PM
Siddharth Naithani
Siddharth Naithani - avatar
2 Antworten
13th Jan 2017, 8:25 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
void functions doesnt return a value void func() { int x = 5; int y = 3; int sum = x + y; std::cout << sum; } with an int function you can return the value int func() { int x = 5; int y = 3; int sum = x + y; return sum; }
13th Jan 2017, 8:28 PM
Kawaii
Kawaii - avatar