Recent changes
Slingshot user guide
tag Guide, user
NFCLamp user guide
tag Guide, user
Homepage
MPL115A2
Compiler Error 42
From the mbed microcontroller Cookbook.  

Compiler Error 70

Incomplete type is not allowed

main.cpp

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    char data[];     // <---- Incomplete type
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}

The array cannot be defined without a size. You can specify the size like this

char data[5];

or

char data[] = {'a', 'b', 'c', 'd'};



calendar Page history
Last modified 2 weeks, 5 days ago, by   user Stephen Paulger   tag No tags | 0 comments  

Please login to post comments.