V
vib
Hi there,
I am stuck with the following code. It is an array of pointers, in
ADS1.2 compiler I encounter the errors, but not on other compiler. Can
someone please shade some light, please! Frankly, I can't see anything
wrong with the code, but the compiler just refuse it as I wish.
Thanks in advance
vib
--------
unsigned int myvar1=1, myvar2=2;
const * unsigned int myArrayOfPtr[] = {
(* unsigned int)&myvar1,
(* unsigned int)&myvar2,
};
-------
Error : (Serious) C2322E: Expecting <declarator> or <type> but found
'unsigned'
lcd_drv.c line 92
Error : C2285E: expected ';' or ',' - inserted ';' before '{'
lcd_drv.c line 92
Error : (Serious) C2337E: Misplaced '{' at top level - ignoring block
lcd_drv.c line 92
Error : (Serious) C2291E: <expression> expected but found 'unsigned'
lcd_drv.c line 93
Error : (Serious) C2282E: expected ')' - inserted before 'unsigned'
lcd_drv.c line 93
Error : (Serious) C2284E: expected ';' after command - inserted
before 'unsigned'
lcd_drv.c line 93
Error : (Serious) C2304E: <command> expected but found 'unsigned'
lcd_drv.c line 93
Error : C2487E: declaration with no effect
lcd_drv.c line 95
C:\_ucos251_S5L8700x\BSP_S3C2400\src\lcd_drv.c: 0 warnings, 2 errors, 6
serious errors
I am stuck with the following code. It is an array of pointers, in
ADS1.2 compiler I encounter the errors, but not on other compiler. Can
someone please shade some light, please! Frankly, I can't see anything
wrong with the code, but the compiler just refuse it as I wish.
Thanks in advance
vib
--------
unsigned int myvar1=1, myvar2=2;
const * unsigned int myArrayOfPtr[] = {
(* unsigned int)&myvar1,
(* unsigned int)&myvar2,
};
-------
Error : (Serious) C2322E: Expecting <declarator> or <type> but found
'unsigned'
lcd_drv.c line 92
Error : C2285E: expected ';' or ',' - inserted ';' before '{'
lcd_drv.c line 92
Error : (Serious) C2337E: Misplaced '{' at top level - ignoring block
lcd_drv.c line 92
Error : (Serious) C2291E: <expression> expected but found 'unsigned'
lcd_drv.c line 93
Error : (Serious) C2282E: expected ')' - inserted before 'unsigned'
lcd_drv.c line 93
Error : (Serious) C2284E: expected ';' after command - inserted
before 'unsigned'
lcd_drv.c line 93
Error : (Serious) C2304E: <command> expected but found 'unsigned'
lcd_drv.c line 93
Error : C2487E: declaration with no effect
lcd_drv.c line 95
C:\_ucos251_S5L8700x\BSP_S3C2400\src\lcd_drv.c: 0 warnings, 2 errors, 6
serious errors