0

I don't really understand the use of void statement in c++. Can someone pls explain the meaning of void statement.

C++

13th Nov 2020, 5:29 PM
Eunice Nwadioha
Eunice Nwadioha - avatar
5 Réponses
13th Nov 2020, 9:22 PM
Gabriele Gatti
Gabriele Gatti - avatar
+ 3
I don't no much about C++ but void in Java simply means return nothing. You must add the void keyword when you're defining an impure function or function that doesn't return anything but maybe changes the state of something.
13th Nov 2020, 7:45 PM
Divine Darkey
Divine Darkey - avatar
+ 1
void is a function return type and it just means that the function doesn't return a value. Hope this helps
13th Nov 2020, 5:49 PM
pNK
pNK - avatar
+ 1
The void statement means return nothing
14th Nov 2020, 1:13 AM
George S Mulbah II
George S Mulbah II - avatar