#includeIn this example, we first declare an empty list called mylist. We then use the empty function to check whether the list is empty or not. If the list is empty, the program will print "List is empty". If the list is not empty, it will print "List is not empty". The SummonList empty function is part of the C++ STL, which is included in the standard C++ library.#include using namespace std; int main() { list
mylist; if ( mylist.empty() ) cout << "List is empty"; else cout << "List is not empty"; return 0; }