Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-03-09 11:08:34


On Mar 9, 2006, at 8:08 AM, Camille Lemen wrote:
> param.clear();

Your problem is here. You should not be calling "clear()" on param,
because that will make it have zero elements. The next line of code,
that tries to write to the 0th element of param, is actually
incorrect. Remove the param.clear(); line and things should work as
expected.

> param[0] = 2;
> std::cerr<<"param[0] = "<<param[0]<<std::endl;
> param[1] = 50;
> std::cerr<<"param[1] = "<<param[1]<<std::endl;

        Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net