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....

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.

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.

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.

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

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.