Answers for "size of stack in c++"

C++
1

size of stack in c++

std::stack<int> st;

std::cout << "size of stack: " << st.size();
Posted by: Guest on December-10-2020
1

check an stack is empty c++

std::stack <int> st;
if(st.empty())
  std::cout << "stack is empty";
Posted by: Guest on June-05-2020

Browse Popular Code Answers by Language