title: Check array empty c++
body: <p>I'm looking for a solution that how can I find the one dimension array which does not contain any elements. I had done so far some following codes which pretty code, but it will be good if there is any other solution for it. </p>
  
  <p>Code_01</p>
  
  <pre><code>#include &lt;iostream&gt; 
  #include &lt;list&gt; 
  using namespace std; 
  
  int main() 
  { 
      list&lt;int&gt; mylist{}; 
      if (mylist.empty()) { 
          cout &lt;&lt; "True"; 
      } 
      else { 
          cout &lt;&lt; "False"; 
      } 
      return 0; 
  }
  </code></pre>
  
  <p>Code_03</p>
  
  <pre><code>#include &lt;iostream&gt; 
  #include &lt;vector&gt; 
  using namespace std; 
  
  int main() 
  { 
      vector&lt;int&gt; myvector{}; 
      if (myvector.empty()) { 
          cout &lt;&lt; "True"; 
      } 
      else { 
          cout &lt;&lt; "False"; 
      } 
      return 0; 
  } 
  </code></pre>