S
sipetar
HI.first of all i am sorry on my very bad english(spelling and grammar)
I have one problem.. need to write program that simulates Eratostens
riddle(in C) using bit vector, but I dont know how to implement bit
vector
and how to use it.
I've got something like this:
#define BIT_SET(v, n) (v[(n)>>3] |= 1U << ((n) & 7))
#define BIT_CLR(v, n) (v[(n)>>3] &= ~(1U << ((n) & 7)))
#define BIT_ISSET(v, n) (v[(n)>>3] & (1U << ((n) & 7)))
but I dont understand this, so if you can help me i would appreciate
that..
THANK YOU...
I have one problem.. need to write program that simulates Eratostens
riddle(in C) using bit vector, but I dont know how to implement bit
vector
and how to use it.
I've got something like this:
#define BIT_SET(v, n) (v[(n)>>3] |= 1U << ((n) & 7))
#define BIT_CLR(v, n) (v[(n)>>3] &= ~(1U << ((n) & 7)))
#define BIT_ISSET(v, n) (v[(n)>>3] & (1U << ((n) & 7)))
but I dont understand this, so if you can help me i would appreciate
that..
THANK YOU...