??? 04/23/08 16:08 Read: times |
#153891 - What compiler? Responding to: ???'s previous message |
George Rubin said:
I've been trying to initialize a pretty big array, but I'm encountering some problems ... I got the following error:
FUNCTIONS.C(9): error C242: 'scalar': too many initializers All software has limits - have you checked what is the limit on the maximum number of array elements for your particular compiler? const unsigned char font[] = { {0x22,0x3c,0x1c,0x3c,...For a single-dimension array, you don't want all those braces (curly brackets)... I've looked up the problem in google and found out that I need to change the syntax of my array a bit, and so I did, this is my second attempt: const unsigned char font[] = { {"\x22" "\x3c" "\x1c"... That sounds highly unlikely - you're initialising your array with a whole load of single-character strings - is that what you really want? |
Topic | Author | Date |
Problem with arrays (atmel 8052) | 01/01/70 00:00 | |
What compiler? | 01/01/70 00:00 | |
Strange way of declaring a font. | 01/01/70 00:00 | |
Why is it strange? | 01/01/70 00:00 | |
what compiler? | 01/01/70 00:00 | |
I'm using Keil uVision 3 | 01/01/70 00:00 | |
That's not a Compiler... | 01/01/70 00:00 | |
Yeah, I ment Keil C51 - doesnt support 2D arrays? | 01/01/70 00:00 | |
Not valid syntax | 01/01/70 00:00 | |
Andy I think you want a semi-colon at the end | 01/01/70 00:00 | |
True:![]() | 01/01/70 00:00 | |
Too large | 01/01/70 00:00 | |
Almost there! | 01/01/70 00:00 | |
Warning | 01/01/70 00:00 | |
Thanks you VERY VERY much! | 01/01/70 00:00 | |
You are welcome! | 01/01/70 00:00 | |
The number of dimensions is incorrect | 01/01/70 00:00 | |
problem was wrong method used | 01/01/70 00:00 |