Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[C#][C++] BitArray class object

  1. Dec 17, 2014 #1
    I am learning both languages for coming certified exams :D
    I have a code line in C# like this

    Code (C):
    byte[] resource=...;
    BitArray data=new BitArray(resource.ToArray());
    I would like to do this in C++ (I am using dynamic_bitset of boost - don't know if this a bad choice)

    Code (C):

    std::vector<unsigned char>resource=....
    boost::dynamic_bitset<> data(resource.begin(),resource.end());
    I am not a fan of boost, have you any other ways to covert the above C# code into C++. bitset of C++ only allows specification of template bitset size at compile time.
    Last edited by a moderator: Dec 17, 2014
  2. jcsd
  3. Dec 23, 2014 #2
    Thanks for the post! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?
  4. Dec 24, 2014 #3

    Filip Larsen

    User Avatar
    Gold Member

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook