Blitz logo

Blitz Bugs :

From: Kevin Baggett (kevinb_at_[hidden])
Date: 2002-12-05 16:23:08


Todd,
I am trying to use resizeAndPreserve on my vector but that doesn't seem to be working - giving some error messages
about operator= being private in this context.  I basically have the following:
Vector <double> out;
...
/* read in values into out using fread*/
...
out.resizeAndPreserve(numItemsRead);
Thanks!
Kevin

Todd Veldhuizen wrote:

Hi Kevin, does this happen if you use the resizeAndPreserve method
(which is intended to guarantee that elements are preserved.. the
resize method does not)?

Cheers,
Todd

Kevin Baggett wrote:
>
> Hi
> I was using the Vector class.
> My particular vector had various values at the beginning, with 0's in
> the rest.
> When I used the .resize method, it resized it correctly to say 37, but
> took the last 37 elements instead of the first 37 where the actual data
> was.
> Is there any way to change this?
> Thanks!
> Kevin
>
> --
> Kevin Baggett                  e-mail:kevinb@ssec.wisc.edu
> UW-Madison/SSEC                phone: (608)265-2740
> Cooperative Institute for Meteorological Satellite Studies
> 1225 W Dayton St, Room 253
> Madison WI 53706
>
>
> _______________________________________________
> Blitz-bugs mailing list
> Blitz-bugs@oonumerics.org
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-bugs
>

--
Todd Veldhuizen  /  tveldhui@acm.org  /  Indiana University Computer Science
_______________________________________________
Blitz-bugs mailing list
Blitz-bugs@oonumerics.org
http://www.oonumerics.org/mailman/listinfo.cgi/blitz-bugs

--
Kevin Baggett                  e-mail:kevinb@ssec.wisc.edu
UW-Madison/SSEC                phone: (608)265-2740
Cooperative Institute for Meteorological Satellite Studies
1225 W Dayton St, Room 253
Madison WI 53706