porting spiht to cpp: 1st iteration
Merge pull request #15 from tttor/spiht-cpp

porting spiht to cpp: 1st iteration