Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* problem using va_arg using stdarg.h
@ 2003-03-19 12:03 Avi Putty
  0 siblings, 0 replies; only message in thread
From: Avi Putty @ 2003-03-19 12:03 UTC (permalink / raw)


Platform: V5.1 732 alpha

Using gcc version 3.0.2

I am having a problem using va_arg function.

I am including the stdarg.h header file.

I perform the following:

void foobarfunction(const char* name)
{

  va_list ap;
  char* value;

  va_start(ap, name);

  value = va_arg(ap, char*);

  va_end(ap);

  printf("value = [%s] \n",(char*) value);

}

The program core dumps when I try to print out the contents.  Am I
using va_arg  incorrectly or I am missing a step?

Any help would be greately appreciated.

Thanks.

Avi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-19 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-19 12:03 problem using va_arg using stdarg.h Avi Putty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox