Why do we need value-returning functions? I'm just a beginner at C++ programming. I am currently having hard time grasping the usage of value returning function and non-value returning function. Void functions are called non-value returning function but they can return value if we assign certain parameters, compute the parameters and call them in the main function. So, doesn't this defeat the purpose? I feel like I am getting this wrong, so some explanation here would be great!

Also, I see that void functions are easier to use, since I don't need to use " cout&lt;&lt; 'the void function' &lt;&lt; endl; "
It seems easier and the value-returning function seems useless. I need explanation here as well as to why we need value-returning function.

Please bear with my questions and I am always ready to learn!
"Need" as such, no. There you are right, all the work can be done using void functions, by passing pointers to variables to modify instead, or changing global variables. In fact, everything is compiled down to assembly language, and no such language I know of has "functions" that return values.

On the other hand, we are accustomed (by mathematics, and by lots of it's applications in everyday life) to think in terms of functions that are applied to arguments and return a value. Think of sin x, square root, and a long list of others, like lowly strlen() in C. It is a nice simplification to be able to say:

y = abs(x) - 42 * sqrt(b);


instead of something like:

pabs(x, &amp;xa);
psrqrt(b, &amp;ba);
y = xa - 42 * ba;


Come to think about it, multiplication and subtractions are functions returning values too (X&amp; operator*(const X&amp;, const X&amp;) and X&amp; operator-(const X&amp;, const X&amp;) in C++), and the handling of results and intermediate values soon gets unmanageable. One of the points of a programming language is to handle such bureaucratic details for you, transparently.