Reputation: 179
when I compile my project, I get the following error.
error:Multiple definition of main() what is the problem?
Here is the code:
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
myserver server;
server.startserver();
return a.exec();
}
Upvotes: 0
Views: 1399
Reputation: 11162
That means in your program you have at least two functions named main
. Search for main
in your source files and eliminate one or more (by renaming/refactoring for example).
You can have only one function called main
in a C/C++ program.
Upvotes: 5