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

Can you post the code that is giving this error ?

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.

I don't see a main () function or a WinMain () function.

That may be why he is getting this error :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.