can anyone explain to me what return does? I know that return(0) stops the program at any given point, but what does returning others do?
Instinctlol 0
Light Poster
Recommended Answers
Jump to Postcan anyone explain to me what return does? I know that return(0) stops the program at any given point, but what does returning others do?
Well, return is used to give the return value of a function. When you use return 0, that means that the program was successful. If …
Jump to PostOK, I'll try to explain this as simply and accurately as I can.
First though, a note on functions:
All functions must return something...Anything, even if that something is actually nothing (if a function returns nothing then you use the 'void' return type).Return doesn't end the program …
All 8 Replies
zortec 11
Junior Poster
JasonHippy 739
Practically a Master Poster
Instinctlol 0
Light Poster
zortec 11
Junior Poster
JasonHippy 739
Practically a Master Poster
Narue 5,707
Bad Cop Team Colleague
JasonHippy 739
Practically a Master Poster
Narue 5,707
Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.