This is the mail archive of the gcc@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]

g++ question about what libraried




---------- Forwarded message ----------
Date: Tue, 29 Aug 2006 14:38:28 +1000 (EST)
From: Serge Bögeholz <serge@turing.une.edu.au>
To: gnu@gnu.org
Subject: g++ question

To whom it may concern,

I'm currently using the following version of g++

g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)

I was writing some code to test the  toupper(ch) library function that
is found in the cctype library.

I noticed I had not entered the line

#include <cctype>

in my C++ program, yet my program compiled and ran correctly as though I had.

**********************
I've included the source file as an attachment to this email, and here is the output of the program:


% a.out
temp = h
To upper conversion: H
                 *********************

Why did this work - all the C++ books I've read state that you need to
include the cctype library if you want to use the toupper(..) function.

Also, is there any documentation on this matter. (I've look around the GNU site and am at a loss as to where to look/find this type of information)

Kind regards
serge

Attachment: try.cpp
Description: Text document


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