N
neo88
hi guys
Can anyone please tell me what is wrong with this function:
inline int strength(void) {
int a;
// tests to see what strength value the agent just attacked\defended
with
for (strength[a]; a < 5; a++)
int strength[a] = int power[a] + int effect[a]; // array of
strength
// values added
return a; // this returns the value to the calling function
(getStrength)
}
The gcc gives me these errors:
pointer to a function used in arithmetic
parse error before '[' token
So what is going on here? What I am trying to do is add the values of
two arrays and put them in another on that can be accesed by a calling
function.
May the Source be with you.
neo88
Can anyone please tell me what is wrong with this function:
inline int strength(void) {
int a;
// tests to see what strength value the agent just attacked\defended
with
for (strength[a]; a < 5; a++)
int strength[a] = int power[a] + int effect[a]; // array of
strength
// values added
return a; // this returns the value to the calling function
(getStrength)
}
The gcc gives me these errors:
pointer to a function used in arithmetic
parse error before '[' token
So what is going on here? What I am trying to do is add the values of
two arrays and put them in another on that can be accesed by a calling
function.
May the Source be with you.
neo88