Hi, I'm running 1.03/04 on WindowsNT 4.0, Service pack 3. I have the following macro in a file test.c: void test (char *filename) { TFile f (filename); TFile *t = new TFile (filename); TFile z ("junk.txt"); } In root I run it with ".X test.c("junk.txt");" Junk.txt does not exist in my current directory, so I expect all three statements to fail. Runnning it shows that the second two do, indeed, produce an error message. No error message is forthcoming from the first TFile delc. In fact, the object "f" doesn't even seem to exist! (i.e. I can't do a IsOpen on it). I searched the web site and documentation the best I could and the only clue I could come up with is that TFile's constructor wants an argument of Text_t. I tried replacing the char * with a Text_t * but it didn't change anything. BTW, the error message from the second TFile decl indicates that the "junk.txt" string is getting in just fine. I also looked at the root/cint docs to see if there was some restriction on stack created objects, but I didn't see any references... Cheers, Gordon.
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET