• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: BOOL array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BOOL array


  • Subject: Re: BOOL array
  • From: "Clark Cox" <email@hidden>
  • Date: Mon, 15 Sep 2008 14:51:01 -0700

On Mon, Sep 15, 2008 at 2:43 PM, Alex Reynolds <email@hidden> wrote:
>>
>> Of course there's always std::vector< bool > ;-) usually at 1 bit per
>> bit...
>>
>> --
>> Scott Ribe
>> email@hidden
>> http://www.killerbytes.com/
>> (303) 722-0567 voice
>
>
> Thanks for the tip. So I ended up going the route of making my .m files into
> .mm files, and using std::vector< vector<BOOL> > to store vectors of
> vector<BOOL>'s.
>
> I found that iterator and const_iterator did not work on vector<BOOL> or
> vector<bool> objects. I grabbed vector.size() in order to loop over the
> vector.
>
> Is there a difference in the underlying storage between vector<BOOL> and
> vector<bool>? Is it really a vector of single bits or a vector of larger
> data?

vector<bool> will use 1 bit per element, vector<BOOL> will use 8 bits
per element.

>
> Are there any downsides to creating Cocoa-based applications in Objective
> C++?
>
> Thanks,
> Alex
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>



--
Clark S. Cox III
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: BOOL array (From: "Alex Reynolds" <email@hidden>)

  • Prev by Date: Re: BOOL array
  • Next by Date: Re: BOOL array
  • Previous by thread: Re: BOOL array
  • Next by thread: Re: BOOL array
  • Index(es):
    • Date
    • Thread