working with an array that is a float
/*hi the answer to this is proberly really easy
i am trying to multiply a bit of data from the array by an integer*/
float data[40][7] = {
{1, 20, 1.6, .873, 111, .00608}, /*.....etc*/
deadload = t*(data[j][3]) + c*(data[i][3]);
/*i, j, c and t are all integers deadload is a float the program doesn't error but the output is addresses i think*/
Re: data array manipulation
i am not sure what you are tryin to accomplish...... please give more info...
by the way why the brackets areoud the array ???? :confused: try this
Quote:
deadload = (t*data[j][3]) + (c*data[i][3]);
Re: working with an array that is a float
This code is correct. The error must come from somewhere else.
Re: working with an array that is a float
please dont post multiple threads for the same issue ..
Re: data array manipulation
did u initialize all the variable like i,j etc because by default they are auto and contain garbage value.so u r going to get some garbage value in your result.
Thanx