   std::fixed
  if i want to output a double via << operator, and have there be no decimal places appear, what form of std::fixed tdo i need to use?(i have googled this is results are random and sparse) 
  std::fixed and std::noshowpoint should do the trick, you may need std::setprecision(0) too.  