is it possible to have a back() in stack....i know queue and vector has it...
#include "Card.hpp"
#include "Card2.hpp"
#include <stack>
using namespace std;
typedef char StackItemType;
bool Card::isEmpty() const {
return cards.size() == 0;
}
Card Card::see() const {
return cards.back();
}
Card Card::pop() {
Card c = cards.back();
cards.pop_back();
return c;
}
void Card::push( const Card& c ) {
cards.push_back( c );
}
int Card::size() const {
return cards.size();
thank u for ur help...