Q:

C++ must define as static constexpr double - cant initialize static non-integral variable inside Class

// Ive found useful information in other questions relating to static variables and their initialization.  I found a work around (didnt feel like solving this with a separate file as suggested here: Initialize static variables in C++ class?),  but that would be the solution in order to be able to use a static variable as an accumulator for operations performed on specific instances through their methods. 
Im sorry for the time wasted, I dont think this question adds any value to the community and should be closed. 
Static Function mostrarTotal() which attempts to print two static accumulators doesnt work, because they are incorrectly defined. 

class Vendedor {
    private:
        static double sumatot;
        static double comtot;
    public:
        static void mostrarTotal();
};

//Static method to print static variables sumatot and comtot
void Vendedor :: mostrarTotal() {
    cout << "Las ventas totales fueron: " << sumatot << " para una comisión de: " << comtot;
}

int main () {

//This line throws the error
    Vendedor::mostrarTotal();

    return 0;
}

A:

You should call static functions like ClassName::functionName(), in your case :
Vendedor::mostrarTotal();

