error shows up on the third line if(ungefarlika(a,b)){
double a = 0.3;
double b = 0.1 + 0.1 + 0.1;
if ( ungefarlika(a,b) ){           
    cout << "a och b har ungefär samma värden" << endl;
    if (a==b)
        cout << "De har samma värden" << endl;
    else {
        cout << "Men bara ungefär" << endl;
    }
    else cout << "a och b är inte särskilt lika" << endl;
  }
