Pointer-to-Object type error


Joined
Mar 26, 2022
Messages
2
Reaction score
0
I have defined some variables

Code:
#define SYS_LEN 50.0
#define N_CELLS ((int)SYS_LEN)

as well as

Code:
extern double *array_one

where I populate the array via

Code:
array_one[0] = 0.5*SYS_LEN
array_one[1] = 0.25*SYS_LEN

I then go onto define a further array within a function

Code:
void function(void)
{
int is, ix;
double X;
for (is = 0; is < MAX_VALUE; is++){
    for (ix = 0; ix < MAX_VALUE_TWO; ix++)
    {
    X[is] = 0.5 + (double)ix - array_one[is]
    }
}}

However I get an error stating 'expression must have pointer-to-object type'. Not too sure why this is, any help would be appreciated

Thank you
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top