Cách sửa lỗi undefined reference to winmain trong dev c++

I used the IDE to create the Class files [.cpp aand .h]. The mistake I made, which caused my error was I put main[] inside the automatically generated block - namespace std { ... }. Outside, I don't get the "undefined reference to `WinMain@16'" error. Easy to see now why it didn't find the entry point.

include "A.h"

namespace std {

A::A[] { // TODO Auto-generated constructor stub

}

A::~A[] { // TODO Auto-generated destructor stub

}

int main[ int argc, char** argv ]{ //

Chủ Đề