Compiler Error 247

function 'main' has already been defined

main.cpp

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}

int main() {   // <---- function main is defined a second time.
    myled = 1;
}

All wikipages