Thread: vector<bool> push_back

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490

    vector<bool> push_back

    I have a piece of code which converts a string into a vector<bool>. To do that, I have to use push_back() 8 times for every byte, and it can get into millions of bytes. Is there a way I can speed this up?

    //edit: Also, how are bool's represented in memory? Can I do a union between chars and bools and do it that way?
    Last edited by ygfperson; 03-02-2003 at 10:41 PM.

Popular pages Recent additions subscribe to a feed