stdarg.h reads too many arguments
<pre><code>void wczytaj(N nazwa, O x1, ...) {
    va_list arg;
    O x;
    ...
    va_start (arg, x1);
    for (x = x1; x; x = va_arg(arg, O)) {
        w.punkt.push_back(x);
        cout &lt;&lt; "DODANO " &lt;&lt; x &lt;&lt; endl;
    }
    va_end (arg);
    ...
</code></pre>

<p>I'm using it like this</p>

<pre><code>s.wczytaj(n, x1, x2, x3);
</code></pre>

<p>where n is "asd", x1 = 1, x2 = 2, x3 = 3;</p>

<p>On output I can see</p>

<pre><code>DODANO 1
DODANO 2
DODANO 3
DODANO 1081714496
</code></pre>
