Hello,
This again is probably a compiler issue. Your patients are very appreciated.
I have declared two seperate pointers to two seperate arrays of strucutures
on the heap. They are declared one after the other as shown at symbol (!!!)
in code below.
Am I not allowed to do this?
Please view the errors after code example.
Here is the code:
======================================ACM152.c
#include <LCD.c> //LCD FUNCTIONS
void main()
{LCD_PAINTSCREEN(1);}
============================================
=========================================LCD.c
#include <TCP.c>
void LCD_PAINTSCREEN ( int FLASHSOURCE)
{
//(!!!) Declaing two pointers (pMCB and pXXX) pointing to two arrays of
structures
struct MCB* pMCB;
pMCB = malloc(16*sizeof(struct MCB));
struct XXX* pXXX; //LINE 18 !!!!
pXXX = malloc(176*sizeof(struct XXX));
free(pMCB);
free(pXXX);
}
============================================
=========================================TCP.c
struct MCB{
int A0;
int A1;
int A2; };
struct XXX{
int B0;
int B1;
int B2;};
==================================================
Errors are:
LINE 18 (1,7): "A numeric expression must apper here"
LINE 19 (6,10): "Unidentified identifier" pXXXX
LINE 22 (6,10): "Unidentified identifier" pXXXX
I appreciate your much needed feedback!!!
--
Best regards
Robert