#include #include "v_array.hpp" void test_variable_length_array (size_t length) { BOOST_V_ARRAY (array, int, length); std::cout << "size: " << array.size () << std::endl; int n = 0; for (boost::v_array::iterator i = array.begin (); i < array.end (); i++) *i = n++; for (boost::v_array::iterator i = array.begin (); i < array.end (); i++) std::cout << "value: " << *i << std::endl; } int main (void) { test_variable_length_array (18); return 0; }