for (map<string, int*>::iterator j = targets.begin(); j != targets.end(); ++j)
{
- int maxguns = (*j->second)/total * guns;
+ float maxguns = float((*j->second))/total * guns;
cerr << "Now shooting at target: " << j->first << endl;
double k = maxguns;