Click here to Skip to main content
15,894,646 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralSTL resource using eMbedded Visual C++ 3.0 Pin
14-May-01 15:53
suss14-May-01 15:53 
GeneralRe: STL resource using eMbedded Visual C++ 3.0 Pin
Matt Philmon29-May-01 12:40
Matt Philmon29-May-01 12:40 
Generalrunnning batch files with asp Pin
Matt Schwienteck14-May-01 11:42
Matt Schwienteck14-May-01 11:42 
GeneralAntialiasing Pin
14-May-01 7:49
suss14-May-01 7:49 
GeneralProgramming Problem Pin
mvworld14-May-01 4:04
mvworld14-May-01 4:04 
GeneralRe: Programming Problem Pin
Thomas Freudenberg14-May-01 5:22
Thomas Freudenberg14-May-01 5:22 
GeneralRe: Programming Problem Pin
mvworld14-May-01 5:34
mvworld14-May-01 5:34 
GeneralRe: Programming Problem Pin
Thomas Freudenberg14-May-01 5:40
Thomas Freudenberg14-May-01 5:40 
Here is en example, found at MSDN:
void main( void )
{
   /* Call with 3 integers (-1 is used as terminator). */
   printf( "Average is: %d\n", average( 2, 3, 4, -1 ) );
 
   /* Call with 4 integers. */
   printf( "Average is: %d\n", average( 5, 7, 9, 11, -1 ) );
 
   /* Call with just -1 terminator. */
   printf( "Average is: %d\n", average( -1 ) );
}
int average( int first, ... )
{
   int count = 0, sum = 0, i = first;
   va_list marker;
 
   va_start( marker, first );     /* Initialize variable arguments. */
   while( i != -1 )
   {
      sum += i;
      count++;
      i = va_arg( marker, int);
   }
   va_end( marker );              /* Reset variable arguments.      */
 
   return( sum ? (sum / count) : 0 );
}
HTH,
Thomas




I am a signature virus!
Help me spread and copy me to your sig!

GeneralRe: Programming Problem Pin
mvworld14-May-01 5:47
mvworld14-May-01 5:47 
GeneralRe: Programming Problem Pin
Thomas Freudenberg14-May-01 6:07
Thomas Freudenberg14-May-01 6:07 
GeneralNot difficult. Pin
16-May-01 10:47
suss16-May-01 10:47 
GeneralRe: Programming Problem Pin
David Fleming17-May-01 23:02
David Fleming17-May-01 23:02 
GeneralRe: Programming Problem Pin
mvworld17-May-01 23:15
mvworld17-May-01 23:15 
GeneralRe: Programming Problem Pin
19-Jun-01 16:15
suss19-Jun-01 16:15 
GeneralRe: Programming Problem Pin
mvworld26-Jun-01 4:20
mvworld26-Jun-01 4:20 
GeneralRe: Programming Problem Pin
Malcolm McMahon26-Jun-01 3:09
Malcolm McMahon26-Jun-01 3:09 
Generalvector, deque class template Pin
Heidyen13-May-01 16:31
Heidyen13-May-01 16:31 
GeneralRe: vector, deque class template Pin
Christian Graus13-May-01 17:59
protectorChristian Graus13-May-01 17:59 
GeneralRe: vector, deque class template Pin
Clinton James16-May-01 9:01
Clinton James16-May-01 9:01 
GeneralCreate a file name with date&time Pin
12-May-01 14:30
suss12-May-01 14:30 
GeneralRe: Create a file name with date&time Pin
Rick York12-May-01 16:42
mveRick York12-May-01 16:42 
GeneralRe: Create a file name with date&time Pin
14-May-01 14:15
suss14-May-01 14:15 
QuestionXML on Client Side??? Pin
12-May-01 4:37
suss12-May-01 4:37 
GeneralLooking for Capable Programmers... Pin
10-May-01 16:19
suss10-May-01 16:19 
QuestionTabbed Toolbar - How? Pin
10-May-01 8:46
suss10-May-01 8:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.