bitstring

This is a discussion on bitstring within the C++ Programming forums, part of the General Programming Boards category; Hello! Does anyone know how one would go about allocating a bitset object (from the standard library <bitset>) dynamically, so ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    16

    bitstring

    Hello! Does anyone know how one would go about allocating a bitset object (from the standard library <bitset>) dynamically, so that the user can enter its size at runtime? I'm guessing an overloading of the new operator would be necessary, but I have no idea how to do that.
    Thanks!

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Can't. But there's a dynamic_bitset in the boost library.

    www.boost.org
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    16
    Ok, I'll check it. Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Characters to binary... hexadecimal to binary
    By Trauts in forum C++ Programming
    Replies: 48
    Last Post: 10-27-2002, 04:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21