473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Bit Vector

2
What is the bit vector...?
Oct 23 '07 #1
4 2905
Meetee
931 Expert Mod 512MB
What is the bit vector...?
Hi,

Please read posting guidelines .

For bit vector refer this http://www.sgi.com/tech/stl/bit_vector.html or google.

Regards
Oct 23 '07 #2
gnux
2
What is the bit vector...?
I know how to search in google.....

to know bit vector in a simple and brief way i put the question here..!

If you know what is bit veston tell me in your own way..,
it will deffenitly help me......
Oct 23 '07 #3
Meetee
931 Expert Mod 512MB
I know how to search in google.....

to know bit vector in a simple and brief way i put the question here..!

If you know what is bit veston tell me in your own way..,
it will deffenitly help me......
The link I have attached has enough information about bit vector. If you are asking about bit vector in some reference then you can write it so I can explain in that context. And I know that you know how to search in google. That is why I have told you to do the same.

Regards
Oct 23 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
Just make sure you are not using something like bit_vector which is a vector<bool>.

vector<bool> is not a vector. It is an explicit specialization of a vector and it does not work. Further it uses an internal structure not supported by C++ ()i.i. bit fields). For example, a vector is required to be implemented as an array. That means you can take the address of element 0:
Expand|Select|Wrap|Line Numbers
  1. vector<int>  v;
  2. v.push_back(10);
  3. int* ptr = &v[0];
  4.  
If you try this with vector<bool>, your code won't compile.

vector<bool> is deprecated.

For a bit vector use a bitset:
Expand|Select|Wrap|Line Numbers
  1. bitset<64>  bits;                  //creates a container for 64 bits.
  2.  
Oct 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: {AGUT2}=IWIK= | last post by:
Hello all, It's my fisrt post here and I am feeling a little stupid here, so go easy.. :) (Oh, and I've spent _hours_ searching...) I am desperately trying to read in an ASCII...
9
by: luigi | last post by:
Hi, I am trying to speed up the perfomance of stl vector by allocating/deallocating blocks of memory manually. one version of the code crashes when I try to free the memory. The other version...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
34
by: Adam Hartshorne | last post by:
Hi All, I have the following problem, and I would be extremely grateful if somebody would be kind enough to suggest an efficient solution to it. I create an instance of a Class A, and...
10
by: Bob | last post by:
Here's what I have: void miniVector<T>::insertOrder(miniVector<T>& v,const T& item) { int i, j; T target; vSize += 1; T newVector; newVector=new T;
8
by: Ross A. Finlayson | last post by:
I'm trying to write some C code, but I want to use C++'s std::vector. Indeed, if the code is compiled as C++, I want the container to actually be std::vector, in this case of a collection of value...
16
by: Martin Jørgensen | last post by:
Hi, I get this using g++: main.cpp:9: error: new types may not be defined in a return type main.cpp:9: note: (perhaps a semicolon is missing after the definition of 'vector') main.cpp:9:...
23
by: Sanjay Kumar | last post by:
Folks, I am getting back into C++ after a long time and I have this simple question: How do pyou ass a STL container like say a vector or a map (to and from a function) ? function: ...
6
by: zl2k | last post by:
hi, there I am using a big, sparse binary array (size of 256^3). The size may be changed in run time. I first thought about using the bitset but found its size is unchangeable. If I use the...
24
by: toton | last post by:
Hi, I want to have a vector like class with some additional functionality (cosmetic one). So can I inherit a vector class to add the addition function like, CorresVector : public...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.