Logo Search packages:      
Sourcecode: dart version File versions  Download package

dtcTest1.cxx

#include <dtcFoo.h>

#ifdef DT_EXISTS_IOSTREAM
#  include <iostream>
using std::cerr;
using std::endl;
#else
# ifdef DT_EXISTS_IOSTREAM_H
# include <iostream.h>
# else
error Can not find a copy of iostream
# endif
#endif

int main( const int argc, const char** argv ) {
  dtcFoo foo;
  char t = 19;
  cerr << "BadChar:" << t << endl;
  cerr << "Found an error!!!" << endl;

// Cause a deliberate dodgy memory access.
  int *a  = new int[40];
  delete a;

  if (*a)
  {
    cerr << "Uninitialised value turned out to be true" << endl;
  }

  return 0;

}

Generated by  Doxygen 1.6.0   Back to index