Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > Re: Storing Arr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 9 Topic 4066 of 4262
Post > Topic >>

Re: Storing Arrays in Maps (Or, alternatively, convert hex to dec)

by Jeff Schwab <jeff@[EMAIL PROTECTED] > Mar 17, 2008 at 10:17 AM

Jerry Coffin wrote:
> In article <MPG.2247b88c10ccee14989c05@[EMAIL PROTECTED]
>, 
> jcoffin@[EMAIL PROTECTED]
 says...
> 
> [ ... ]
> 
>> Though this doesn't sup****t the full interface for std::vector, it 
>> sounds like it's probably close enough for your purposes -- and if not,

>> you have the full source code to work with in adding things like 
>> pop_back, begin(), end(), etc.
> 
> Sorry, I meant to mention, but forgot: of course you could just use 
> std::vector instead, since vectors are copyable and assignable as well 
> -- but this will usually add a fair amount of overhead you'd probably 
> rather avoid. In particular, it normally allocates memory from the free 
> store to hold the data, so copying or assigning a vector isn't quite as 
> cheap as you might like. Your constraints are sufficiently tight that a 
> specialized class reduces overhead substantially.

The OP likely already has access to a TR1 array, using which would be 
even easier than rolling his own.

-- 
#include <tr1/array>
 




 9 Posts in Topic:
Storing Arrays in Maps (Or, alternatively, convert hex to dec)
Hal Vaughan <hal@[EMAI  2008-03-13 06:59:08 
Re: Storing Arrays in Maps (Or, alternatively, convert hex to de
"Mike Wahler" &  2008-03-13 06:10:31 
Re: Storing Arrays in Maps (Or, alternatively, convert hex to de
Hal Vaughan <hal@[EMAI  2008-03-13 13:31:50 
Re: alternatively, convert hex to dec
Hal Vaughan <hal@[EMAI  2008-03-13 13:58:41 
Re: alternatively, convert hex to dec
Hal Vaughan <hal@[EMAI  2008-03-13 14:13:34 
Re: Storing Arrays in Maps (Or, alternatively, convert hex to de
Jerry Coffin <jcoffin@  2008-03-17 00:08:33 
Re: Storing Arrays in Maps (Or, alternatively, convert hex to de
Jerry Coffin <jcoffin@  2008-03-17 00:13:49 
Re: Storing Arrays in Maps (Or, alternatively, convert hex to de
Jeff Schwab <jeff@[EMA  2008-03-17 10:17:47 
Re: Storing Arrays in Maps (Or, alternatively, convert hex to de
Jerry Coffin <jcoffin@  2008-03-18 07:17:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 13:14:39 CDT 2008.