dimanche 19 avril 2015

error: invalid use of non-static data member


Vote count:

0




using namespace std;


class Stack {

private:



int tos;
const int max = 10;
int a[max];


public:



void push(int adddata);
void pop();
void printlist();


};


error: invalid use of non-static data member 'max'


whats wrong in the code, and please help me with proper correction. Thankyou



asked 31 secs ago







error: invalid use of non-static data member

Aucun commentaire:

Enregistrer un commentaire