Category : C++ Source Code
Archive   : BLFMATH.ZIP
Filename : RANGEERR.CPP

 
Output of file : RANGEERR.CPP contained in archive : BLFMATH.ZIP
//////////////////////////////////////////////////////////////
// rangeerr.cpp: Here is a sample file showing you how to
// allocate and set an out-of-range error handler for your
// arrays.
// Copyright (c) 1993 Azarona Software. All rights reserved.
//////////////////////////////////////////////////////////////
#include
#include
#include "range.h"

unsigned (*HandleRangeErr)(unsigned i, unsigned sz) = DefaultRangeErrHandler;

unsigned DefaultRangeErrHandler(unsigned i, unsigned sz)
{
cout << "Subscript " << i << " out of range (0, " << (sz-1) << ")\n";
exit(1);
return 0; // Not used in this function
}


  3 Responses to “Category : C++ Source Code
Archive   : BLFMATH.ZIP
Filename : RANGEERR.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/