ok so i'm making a very simple program for myself and others at my school. It is a simple conversion program that converts everything from Kelvin, Celsius, and Fahrenheit. I have finished the main body of the code but I want it to end on the user's input, but I know I am doing something wrong... i just don't know what
It looks good. I wish you could post more of you code becuase there is alot of missing pieces. But as long as were talking about your do...while statement.
Apologies if this has been answered, but my scouring of the internet has not been able to solve my problems so far. Essentially, I want to pass a 2-D array to a function to get a number out:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
double apd(double **m, int percent, int t_startPos, int volt, int size);
int main()
{
int size_full = 20000; int nvar = 15;
double stepsize = control_full[1][0] - control_full[0][0];
int size = bcl/stepsize;
double control[size][nvar];
double apd90_cont = apd(&&control, 90, t_startPosControl, volt, size);
}
double apd(double **m, int percent, int t_startPos, int volt, int size)
{
double ap;
// Use the inputs to get the double ap
return (ap);
}
When I try and run compile this using g++, I get the error message:
param_compare20101011.cpp:125: error: invalid conversion from ‘void*’ to ‘double**’
param_compare20101011.cpp:125: error: initializing argument 1 of ‘double apd(double**, int, int, int, int)’
param_compare20101011.cpp:125: error: label ‘control’ used but not defined
(where the line 125 is the line for the call to the function in the actual program).
I've tried a couple of different configurations, but to no avail. Can anyone help?