Hi
I am trying to initilaise an array manually, ie:
array[]={1,2,3,4,5}; using a function in this class called specialist. I have declared the array in the @interface section but whenever i call
-(void)inputprice
{
array[]={1,2,3,4,5};
};
to input array parameter, i get an error that says parse error before '{' token.
this can be solved by declaring the array as
-(void)inputprice
{
double array[]={1,2,3,4,5};
};
however tt presents a problem whereby the array is localised in the function only. I require it to be addressed elsewhere in the class.
any solutions?
thanks and regards
jeremy
I am trying to initilaise an array manually, ie:
array[]={1,2,3,4,5}; using a function in this class called specialist. I have declared the array in the @interface section but whenever i call
-(void)inputprice
{
array[]={1,2,3,4,5};
};
to input array parameter, i get an error that says parse error before '{' token.
this can be solved by declaring the array as
-(void)inputprice
{
double array[]={1,2,3,4,5};
};
however tt presents a problem whereby the array is localised in the function only. I require it to be addressed elsewhere in the class.
any solutions?
thanks and regards
jeremy