Aprendendo a utilizar alocação dinâmica de memória

Dependencies:   mbed

main.cpp

Committer:
Jamess
Date:
2015-08-06
Revision:
0:b2616aa3f8e4

File content as of revision 0:b2616aa3f8e4:

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc(USBTX,USBRX);

int main() {
    int *james = new int;
    *james = 12;
    
    pc.printf("%i",*james);
}