title: Create va_list dynamically
body: <p>I have a function </p>
  
  <pre><code>void foo(int cnt, va_list ap);
  </code></pre>
  
  <p>I need to use it, but requirement is quite strict, number of <code>va_list</code> vary and it will change during run-time. What I would like to do is:</p>
  
  <p>create a <code>va_list</code> (which expects <code>char*</code>) form </p>
  
  <pre><code>QList&lt;Contact*&gt;
  </code></pre>
  
  <p>where <code>Contact</code> is a defined class</p>
  
  <pre><code>class Contact
  {
     public:
        QString getName();
     private: 
        QString m_name;
  
  }; 
  </code></pre>
  
  <p>and I would like to populate in the loop <code>va_list</code> for example:</p>
  
  <pre><code>for (int idx = 0; idx&lt;contacts.count(); idx++)
  {
      contacts.at(idx)-&gt;getName(); // this i would like to pass to va_list
  
  }
  </code></pre>
  
  <p>Does anybody have a clue about how I could do this?</p>