undefined reference to WinMain@16
i use dev c++ by the way thanks for any help.

It means you created a windows project (which expect to start at WinMain), but you've written a console program which begins at main().

Easiest thing is to create a new console project and copy your program to it.

Sorry for taking so long to reply I have not been able to get online.This is the code

#include "iostream.h"
#include <stdarg.h>
int Menu (char *option1 ...)
{
va_list args; // argument list
char* option = option1;
int count = 0, choice = 0;
va_start(args, option1); // initialize args
do {
cout << ++count << ". " << option << '\ n';
} while ((option = va_arg(args, char*)) != 0);
va_end(args); // clean up args
cout << "option? ";
cin >> choice;
return (choice > 0 && choice <= count) ? choice : 0;
}

Sorry for taking so long to reply I have not been able to get online.This is the code

#include "iostream.h"
#include <stdarg.h>
int Menu (char *option1 ...)
{
va_list args; // argument list
char* option = option1;
int count = 0, choice = 0;
va_start(args, option1); // initialize args
do {
cout << ++count << ". " << option << '\ n';
} while ((option = va_arg(args, char*)) != 0);
va_end(args); // clean up args
cout << "option? ";
cin >> choice;
return (choice > 0 && choice <= count) ? choice : 0;
}

Is this the whole program? I don't see a main () function or a WinMain () function.

This article has been dead for over six months. Start a new discussion instead.