EventSnooper destructor

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • EventSnooper destructor

      Howdy all. First post, with a bug fix.

      Currently, the destructor is

      EventSnooper::~EventSnooper()
      {
      if ( !m_OutFile)
      fclose( m_OutFile );
      }

      I'm pretty sure that test should be
      if (m_OutFile)

      Regards,
      James

      [edit]: I hope this isn't a duplicate. Searching didn't turn anything up

      The post was edited 1 time, last by jimrthy ().

    • RE: EventSnooper destructor

      I guess fclose is good at checking its own parameters - nice catch. Can I wager a guess that you found that looking at the book, right?
      Mr.Mike
      Author, Programmer, Brewer, Patriot