RE:ostream problem traced

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Sun Jun 27 1999 - 00:37:10 MEST


Dear Nick,

Thank you for pointing this out. In fact, #include must not appear within
function body nor class/struct definition. It must appear in global scope 
or within namespace.

Secondly, especially for including iostream in rootlogon, I recommend to
use G__loadfile() API rather than #include.

// rootlogon.C
{
   G__loadfile("iostream.h");
   ...
}

Thank you
Masaharu Goto


-------------------------------------------------
Dear friends,
I found the cause of the ostream problem and solved it.
In my rootlogon.cc (see attached file) I had

void rootlogon()
{
 #include <iostream.h>
 ...
}

In order not to have a global scope for the variables I defined
in that file.
It turns out that this has the effect that the 

#include <iostream.h>

doesn't work anymore in version 2.22/04.
It worked for all previous versions.
If I comment out the "void rootlogon()" everything works fine again.
So I will have to invent some "special names" for the vars I use in my
rootlogon.
Maybe this message could be given to a larger community to prevent
similar "bug" reports. 
-- 

                                              Cheers,
                                               Nick.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:34 MET