In Russian   IMach   Priest - portal of dialogue and creativity   Author  

   E-mail   Last modified - Nov 20, 2010

C++ templates for dynamic arrays with automatic check of an index

Existing programming languages enforce a programmer to indicate size of array and to ensure that neither index will fall beyond the array bounds. To implement alternative technique, templates of dynamic arrays for C++ provide for regular C operations on arrays and pointers combined with automatic allocation of memory and protection against memory overwrite errors without appreciable decline of performance.

Test environments: Microsoft Visual C++ 6.0, 2002-2010, Borland C++ 3.1 (16 bit), 4.5, Builder 1.0, GNU g++ 2.9.6, 3.3.3 (ARM), 4.1.2 (64 bit), 4.2.3.
Performance of dynamic arrays
In detail about dynamic arrays (rus)
The programmer manual and change list

Program  matrix1.cpp (static arrays)
Program  matrix2.cpp (dynamic arrays)
Program  matrix3.cpp (dynamic arrays, with optimization)
Files  exarray.h  exarray.cpp (minimal edition for compilation of programs)
The instruction on start of the programs
Download: Version 1.2c public of Jul 28, 2010, documentation updated Nov 20, 2010new
The preceding version:  1.2b public of Jul 28, 2009 (g++ 64-bit and ARM compatible)
The preceding beta versions:  1.2a beta public of Apr 30, 2007  1.2 beta public of Nov 29, 2006  1.1a beta public of Nov 12, 2005
Donations: You must not pay for the templates. If you have decided to support theirs development - just transfer funds to one of the following WebMoney purses: R717244026810, Z995907015597, E482829916444. Amount is for choice of your own. Please, show purpose of transfer as "exarray". The transfer is accepted as voluntary donation, funds of which are directed to development and testing of the templates. Donation may be conditioned by implementation of additional functions by agreement.
Forum: Consultations (rus)
  • To subscribe to the mailing list 
  • click here and send message.
  • To cancel mailing subscription 
  • click here and send message.
  • To write a letter to the author 
  • click here.
    Though it is not required, you are strongly encouraged to subscribe to the mailing list. The mailing list is intended for delivering of announcements concerning new versions of this software and bug warnings. The author confirms that your email address will never be used for any other purposes and will not be delivered to third persons.

    Paper for IEEE AIS'03 CAD-2003 (rus)   DOC file   Abstract (eng)   DOC file (eng)  
    Paper for NIT'2002 (rus)   DOC file   Abstract (eng)   DOC file (eng)  
    Theses for VMSPSS'99 (rus)   DOC file  

    Links:  C++ class for integers of unlimited range
    Tom Cargill. C++ Gadfly. C++ Report Reprints: Jan 1994
    Delphi 4 Unleashed - Chapter 2.