Some comments on your opening question:
I use haartraining
- Please do not, haartraining is outdated, not developed anymore and is buggy as hell.
- Instead use the newer C++ variant called traincascade, if you want working results.
the hit rate is too low so I decided to use objectmarker
- Why would you do that? Hit rate and object markers have close to no relation.
- Why not investigate why your hit rate is low and try to solve that? Investigate the training data, the training parameters, ...
I use dev c++ and opencv 2.1
- Please, OpenCV 2.1 was developed in 2011 I think and since then tons of updates have been released.
- Use the latest 2.4 branch or master branch branch instead!