title: Pointer to void as an argument in a function with no prototype for variable number of arguments
body: <p>Say I have a function that should accept any number of parameters, so what im coing here is declaring no prototype, and letting the function to be created when it is called in the code. I am using a pointer to void to receive the random number of parametersparameters, however, when doing this, the reference to the memory addres of the first parameter is the only thing that is passed, so for it to work, i would have to declare variables in the same order that i am going to call them in the code:</p>
  
  <pre><code>unsigned char result=0;
  unsigned char a=1; 
  unsigned char b=2;
  unsigned char c=3;
  
  char main (void)
  {
      for (;;)
      {
          result = function (&amp;a, &amp;b, &amp;c);
          result = function (&amp;c, &amp;b, &amp;a);
      }
  }
  
  function (void *vPointer)
  {
      return (1);
  }
  </code></pre>
  
  <p>Also I am declaring function without a type since it would not match the call (where it is implicitly declared also).</p>
  
  <p>The result here is a reference to the first parameter sent in the function, so if i point to the next addres in the first function call, it would work, but in the second call, it gets the reference to c, and whatever memory is ahead of where it is placed. </p>
  
  <p>Anyone know a way of sorting the parameters references the correct way? or an effective way to receive an unknown number of parameters in a function?</p>
  
  <p><strong>NOTE: (...) SHALL NOT be used.</strong> </p>