Mandrake 9.0 & GCC 3.2
bjorn rohde jensen
bjensen@fastmail.fm
Thu Oct 10 13:54:00 GMT 2002
Hi John,
I think, the problem, you are experiencing, is due
to namespaces. The standard library resides in the
std namespace according to the specs, so you have
to use std::cin, std::cout and so forth. The old
.h headers usually dont populate the std namespace
or they pull it in with a using namespace std.
I must say, i am quite surprized at the idea of
declaring main as void main(...), it certainly is
not a standard way of doing things. Why dont you
want to return a meaningfull exit code to the
user/shell/whatever of your executables?? I think,
you really ought to declare main as;
int main(int argc,char *argv[]);
Yours sincerely,
Bjorn
More information about the Gcc-help
mailing list