c++ check if stack is empty code example Example: check an stack is empty c++ std::stack <int> st; if(st.empty()) std::cout << "stack is empty";