// // An STL-ish vector without templates for the Fast Light Tool Kit (FLTK). // // Copyright 2002 by Greg Ercolano. // Copyright 2022 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // // https://www.fltk.org/COPYING.php // // Please see the following page on how to report bugs and issues: // // https://www.fltk.org/bugs.php // #ifndef Fl_Int_Vector_H #define Fl_Int_Vector_H #include /** \file FL/Fl_Int_Vector.H An STL-ish vector implemented without templates. */ /** An STL-ish vector without templates. Handles dynamic memory management of an integer array, and allows array elements to be accessed with zero based indexing: v[0], v[1].. Common use: \code #include #include int main() { Fl_Int_Vector v; // Create an array of values 11,22,33: v.push_back(11); // add first element v.push_back(22); // add second element v.push_back(33); // add third element // Assignment by subscript v[1] = 222; // changes 2nd element from 22 to 222 // Loop through printing the values for ( unsigned int i=0; i