jeudi 29 novembre 2018

Can two functions of the same class share the the values of two member variables? [on hold]

I have a class, named for example shell. In this class I defined two void (f and q) as public and then a list of member variables. The member variables are calculated in the function f, and then when I call the same varaibles them from function q, they have again value 0 (initialization)...how do I fix it please?

class shell {
public:
       void f() const;
       void q() const;
       int a;
       std::vector<int> b;
}

Aucun commentaire:

Enregistrer un commentaire