0

When can we use the type void

3rd Jan 2017, 7:10 PM
Tana
2 Answers
+ 3
You use it when you want your function to return nothing. For example, if you want your function to print out a text only whenever your function gets a certain number, you use void since it the function doesn't 'give' anything to the system, it outputs texts.
3rd Jan 2017, 7:19 PM
Wen Qin
Wen Qin - avatar
+ 1
thx
3rd Jan 2017, 7:21 PM
Tana