I had written, with considerable help from this forum, a program the computes the vapor liquid equilibria of a mixture. Now adding a second part that uses the VLE arrays to compute various 'states' of the distillation process over time. That's the big picture.


To start I need a function(s) to relate a known interpolated value from one array to other arrays. The first step to find the interpolating multiplier has several errors I need some help with. Please note that I entered a subset of the boiler_abv[] values. The true arrays contain 101 elements.


Code:
#include <stdio.h>




/***************************************************/
/*Declare*/
double interpolate_array(double *boiler_abv, size_t boiler_abv_len, float start_abv);




int main()
{
float start_abv = 0.10;


double boiler_abv[10] =
{
   0, 0.032, 0.062, 0.092, 0.12, 0.147, 0.174, 0.199, 0.224, 0.248
};


float interp_factor = interpolate_array(boiler_abv[], sizeof(boiler_abv) / sizeof(boiler_abv[0]), start_abv);


printf("interp factor = %f", interp_factor);


getch();
return (0);
}


/*****************************************************/
/*Definition*/
double interpolate_array(boiler_abv[], size_t boiler_abv_len, start_abv)
{
int i;
float interp_factor = 1.0;


    for(size_t i = 0; i < boiler_abv_len; i++)
    {
        if(boiler_abv[i] == start_abv)
        {
         return interp_factor;
         break;
        }




         else if boiler_abv[i] > start_abv
         {
          hi = boiler_abv[i];
          low = boiler_abv[i-1];
          interp_factor = 1 + (start_abv - low)/(hi - low);
          return interp_factor;
         }


      }
}

|19|error: expected expression before ']' token|
This one I don't get. The whole line is an expression. Last time I had this error it was a malformed return statement.


|19|error: too few arguments to function 'interpolate_array'|
I think I describe 3 arguments to the declaration, definition, and call. ???
|6|note: declared here|


|23|warning: implicit declaration of function 'getch' [-Wimplicit-function-declaration]|
How do you 'pause' for viewing? I get the same warning if I use System (pause).


|12|warning: unused variable 'start_abv' [-Wunused-variable]|
Unused???


|29|error: unknown type name 'boiler_abv'|
|29|error: unknown type name 'start_abv'|
Thought I was clear on what 'type' means: array, float etc.


Maybe one of those things that one simple goof up causes all errors? Just not seeing it. Thanks.