vendredi 4 septembre 2015

undeclared identifier error in if and else if

i have "Q undeclared identifier" error in my code. but why? thanks.

                if(comboBox1->Text=="bbl/D (BPD)")
            {
                double Q=nQ;
            }
            else if(comboBox1->Text=="scf/D (SCFPD)")
            {
                double Q=nQ*11;
            }
            else if(comboBox1->Text=="m^3/D (CUMPD)")
            {
                double Q=nQ*11;

Aucun commentaire:

Enregistrer un commentaire