*** empty log message ***
This commit is contained in:
17
bitvector.cc
Normal file
17
bitvector.cc
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "bitvector.h"
|
||||
|
||||
//inefficient I/O operators
|
||||
ostream & operator<<(ostream &s, const bitvector &x)
|
||||
{
|
||||
for(unsigned int i=0; i<x.size(); ++i) s<< x[i];
|
||||
return s;
|
||||
}
|
||||
|
||||
istream & operator>>(istream &s, bitvector &x)
|
||||
{
|
||||
bool a;
|
||||
for(unsigned int i=0; i<x.size(); ++i) {s >>a; x.assign(i,a);}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user