This is the code how can be solve
struct Tool
{
FILE *in;
FILE *out;
};
int main()
{
Tool *t;
t->in=stdin;
t->out=stdout;
Tool_sendcmd(Tool *tool,"SET VARIABLE value %d",3);
}
void AGITool_sendcmd_nav(TOOLS *tool,char *command, ...)
{
va_list ap;
char buffer[1024],*str;
va_start(ap,command);
vfprintf(tool->out, command, ap);
va_end(ap);
fflush(tool->out);
buffer[0]=0;
str=buffer;
do {
str=fgets(buffer,sizeof(buffer),tool->in);
} while(str=='' && count++<5);
printf("\n%s\n",str);
}
this is the code i have return. so tell me how to store variable argument in str.