This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isalnum not declared CODE


Hi Nicolai,

Your example (with some tweaking) worked on my platform.

My platform is Cygwin / WinXPpro (NT 5.1sp1a) and GCC 3.3.1 (cygming special).

The tweaking should be immaterial. Things like putting in function bodies for String, changing #include <iostream.h> to #include <iostream>, adding in "std::" prefixes in the few spots they're needed, changing where top points to in the makefile.

Keep in mind that ctype.h is not part of GCC; it's supplied by your distribution (Slackware).

It appears that either your GCC was built for a different version of Slackware,
or... you have a filename collision (perhaps due to case insensitive filesystem?)
or... you could try putting #include <cctype> in your main.cc


Generally speaking, it's bad practice to name your project's header files the same as the system header files. Even if they differ in case, such as <ctype.h> versus "CType.h".

Try this:
g++ -E -dI -c main.cc

That should show you if you are actually including the Slackware /usr/include/ctype.h as you expect. I suspect you are not getting what you think you should be getting.

Sincerely,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]