Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
Problem with binary numbers
Hi I'm using stmf411re nucleo mcu and I have following problem .
Problem with binary numbers
#include "mbed.h"
BusOut leds(D9, D8, D7, D6, D5, D4, D3, D2);
float x = .1;
int main(void) {
leds = 0b11001100;
wait(1);
while(1);
}
. after trying to compile i got error :
Error message
Error: Expected a ";" in "main.cpp", Line: 9, Col: 14
1 Answer
10 years, 5 months ago.
The 0b prefix is sadly not defined in the mbed compiler (same for many others tbh). I like it to, but only octal, hex and decimal systems are supported.