cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
UNIX/Linux Programming
void value not ignored as it ought to b
void value not ignored as it ought to be
Jul 30, 2009 at 1:27pm UTC
joe3dge
(17)
i am getting this error when compiling with g++
where can I find documentation on this? I've look all over google without luck.
Jul 30, 2009 at 4:09pm UTC
jsmith
(5804)
It means a function is declared to return nothing (void) but you are assigning the return code to a variable.
eg,
1
2
3
4
5
6
7
void
foo() {
// do stuff
}
int
main() {
int
x = foo();
// error, foo returns nothing
}
Aug 6, 2009 at 4:36pm UTC
joe3dge
(17)
thanks. do you know where it look up to information? i dont know where the error message documentation is
Aug 6, 2009 at 5:29pm UTC
jsmith
(5804)
Not off the top of my head. I'd start here:
http://gcc.gnu.org/onlinedocs/
(I have not looked in detail at the documentation to see if they have compiler error messages).
Topic archived. No new replies allowed.