Hi, a question about some codes


Hi,

I am actually making a program of "Music" in which their is a user who simply should have the rights to play music and the Moderator should have all the rights like making changes in the music files like updating, deleting and adding new music files.

My question is that when do we actually use "Void" as a data type?

I have these following functions.

add music()
delete music()

Now my question is that should we use "Void" as a datatype with these functions?


Regards,
You'd use void for a function when you don't wish to return a value.

Hard to say whether those would be void functions without much context. Often people like to return success/failure indicators and such rather than use void functions.
Topic archived. No new replies allowed.