Stack() { top = -1; } }; void Stack::push(int x) { if( top >= 10) { cout << "Stack Overflow"; } else { a[++top] = x; cout << "Element Inserted"; } }