From: aputty@yahoo.com (Avi Putty)
Subject: problem using va_arg using stdarg.h
Date: 19 Mar 2003 04:03:23 -0800 [thread overview]
Message-ID: <b6c26ce6.0303190403.18828149@posting.google.com> (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
reply other threads:[~2003-03-19 12:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox