I need something like this:
char font[128][8] = {{0}};
font[0][] = {0, 0b00000000, 0b11111100, 0b00010010, 0b00010010, 0b11111100, 0b00000000, 0};
font[1][] = {...}
But in c99 I get "expected expression before '{' token". Please help.
You can only use an initialiser list ({...}) when declaring the array, that's why you're getting an error. You can't assign a value to an array, which is what font[0] is (a char[]).
You have 3 options:
char font[128][8] = {
{0, 0b00000000, 0b11111100, 0b00010010, 0b00010010, 0b11111100, 0b00000000, 0};
{...}
}
Assign each value to an element in the array individually: font[0][0] = x, ..., font[127][7] = y (ie. using a loop).
memcpy blocks at a time from like a uint64_t (sizeof(font[0]) = 8) or wherever else you can neatly/efficiently store the data.
It's probably also worth noting that binary constants are a C extension, and that and if you're working with unsigned data you should probably explicitly use char is signedunsigned char.
char is signed? Since when? In my version of C, whether or not char is signed is a completely implementation-defined decision.
memcpy(), or assign one-by-one in a loop.0b00000000valid in C ?? Help please..