Is it necessary to use cout<< when we call a function in main() ?
if so y? whats the logic?
I tried to call a void function in main() like this
cout<< function();
it gives me a perse error before token')'.
but if i call it like function(); without cout<< it gives me the right output. y is this so?
do we have to use cout<< only when function is not void or when function doesn't take any aurguments?
This is a very simple question with a very complex logic behind it. Can anyone clear this?