RE:streams with CInt

William J. Deninger (deninger@uiuc.edu)
Wed, 22 Oct 1997 18:57:18 -0500


Hello again,

Here is an example of the bug fstreams bug crashing my WinNT 4.0 Service
Pack 3 compiled with Microsoft Visual C++ ver 5.0 using libraries:

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Root_base.lib Root_Cint.lib Root_Clib.lib Root_Cont.lib Root_Func.lib
Root_Gpad.lib Root_Graf.lib Root_Graf3d.lib Root_Hist.lib Root_Html.lib
Root_Meta.lib Root_Minuit.lib Root_Net.lib Root_Postscript.lib
Root_Proof.lib Root_RGL.lib Root_Rint.lib Root_Tree.lib Root_Win32.lib
Root_WinNT.lib Root_X3d.lib Root_Zip.lib

//----------------------------------------
// main.cpp file
#include "TROOT.h"
#include "TRint.h"

int Error;

extern void InitGui();
VoidFuncPtr_t initfuncs[] = { InitGui, 0};
TROOT root("Rint","The ROOT Interactive Interface", initfuncs);
#else

int main(int argc, char **argv)
{
TRint *theApp = new TRint("Root example", &argc, argv, NULL, 0);
// Run interactive interface
theApp->Run();

return (0);
}

//---------------------------------------------
// Simple.h: interface for the Simple class.

#if
!defined(AFX_SIMPLE_H__41358B61_4B1F_11D1_9296_0060972D879B__INCLUDED_)
#define AFX_SIMPLE_H__41358B61_4B1F_11D1_9296_0060972D879B__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "TObject.h"

class Simple : public TObject
{
public:
Simple();
virtual ~Simple();

ClassDef(Simple,1)
};

#endif //
!defined(AFX_SIMPLE_H__41358B61_4B1F_11D1_9296_0060972D879B__INCLUDED_)

//-------------------------------------------------
// Simple.cpp file

#include "Simple.h"
#include "fstream.h"

ClassImp(Simple)

Simple::Simple()
{
ofstream test;
test.open("test.txt");
test << 3.1415 << endl;
test.close();
}

Simple::~Simple()
{
}
\\---------------------------------------

HELP ME!!!!! Ahhhhhhhhhhhh! (suffering severe lack of sleep at the
moment)

William J. Deninger