0

I installed c++ and started to write a new simple program.But i got a warning "Function should return a value". The source code is correct and the directories are also correct.
What should I do? Pls help....

4
Contributors
4
Replies
6
Views
6 Years
Discussion Span
Last Post by $urya
0

If the compiler's error or warning says the function should return a value, then I'd try and have the function return a value. ;)

Prototype your functions, and make sure the actual function return types, match the return types of your prototypes.

0

HI there,

If your function having nothing to return then type :

return(void);

In the end of of your function body. It will stop pointing this error for particular function.

0

Please paste the code snippet which gives the error.

HI there,

If your function having nothing to return then type :

return(void);

In the end of of your function body. It will stop pointing this error for particular function.

0

Yes if your problem persist then you have to paste your source code, so that we can understand the exact situation.

Edited by $urya: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.