All pastes #915518 Raw Edit

Mine

public cpp v1 · immutable
#915518 ·published 2008-02-23 21:24 UTC
rendered paste body
#include <iostream>#include <cstdlib>float bmiFunktion(float length, float kg, float tot);using namespace std;struct varde{        float kg;        float length;        float tot;};int main(){        varde total;                cout << "Ange hur lång du är:___\b\b\b";                cin >> total.length;                cout << "Ok. Du är " << total.length << "."<< endl;                cout << "Ange din vikt:__\b\b";                cin >> total.kg;                bmiFunktion(total.length, total.kg, total.tot);        return 0;}        float bmiFunktion(float length, float kg, float tot)        {                total.tot = total.kg / (total.length * total.length);                cout << "Ditt BMI-värde är: " << total.tot << "\n";        }/* bmi.cpp: In function "float bmiFunktion(float, float, float)":bmi.cpp:29: fel: "total" deklarerades inte i detta definitionsområde */