Update bitvector.cpp

Change the function "write(int)" into a non-const one.