RE: 'cout' not recognized

Date: Tue, 19 Jul 2005 11:38:45 -0500

That did it very nicely. Thank you very much, Paul!

-Chris Doran
>>> "Paul Nilsson" <> 07/19/05 11:23 AM >>> Hi,

Try to specify the namespace explicitly by replacing cout with std::cout, endl with std::endl.


-----Original Message-----
[] On Behalf Of CHRISTOPHER DORAN Sent: den 19 juli 2005 17:37
Subject: [ROOT] 'cout' not recognized

Hello again,

For reasons having to do with rootd, it appears I must use version 4.00/08 to run code intended for 3.05/07. The only problem I have is that I'm not able to use 'cout' without errors. Here are the major messages I receive when I try to run my code:


/cdf/atom/code/cdfsoft/products/gcc/v3_4_3/Linux+2.4/bin/../lib/gcc/i686 -pc-linux-gnu/3.4.3/../../../../include/c++/3.4.3/backward/backward_warn ing.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from /cdf/disk03/g3/newJetCondensed/./fileorbjQF.h:29,


/cdf/disk03/g3/newJetCondensed/./fileorbjQF.cxx:13: /cdf/disk03/g3/newJetCondensed/./jetFill.C: In member function `void jetFill::Loop()':
/cdf/disk03/g3/newJetCondensed/./jetFill.C:563: error: `cout' undeclared (first use this function)
/cdf/disk03/g3/newJetCondensed/./jetFill.C:563: error: (Each undeclared identifier is reported only once for each function it appears in.) /cdf/disk03/g3/newJetCondensed/./jetFill.C:563: error: `endl' undeclared (first use this function) .

g++: /cdf/disk03/g3/newJetCondensed/./fileorbjQF.o: No such file or directory
Error in <ACLiC>: Compilation failed!

And here are the headers I'm using:

#define jetFill_cxx
#include "jetFill.h"
#include "TH2.h"
#include "TProfile.h"
#include "TStopwatch.h"
#include "TTimeStamp.h"
#include "TString.h"
#include "TStyle.h"
#include "TCanvas.h"
#include <TMath.h>
#ifndef __MAKECINT__
#include <iostream>
#include "fstream.h"

#include "goodRunsV7_1p.hh"

Again, without the 'cout's and 'endl's, my code runs fine. Can someone help me get this working without having to comment out every 'cout' and 'endl'? I'm hoping it's a pretty simple fix. Thanks a lot!

-Chris Doran
 DePauw University
 FNAL SULI Intern Received on Tue Jul 19 2005 - 18:41:33 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET