I have the following code, but compiling error message:
"cannot convert parameter 1 from 'float' to 'float " when I call flow(v1, v2, v3, v4).
Could any one out there help me to find the problem and fix it?
Thank you!
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#define Length 50
void run (float *here, float *there, float *date, float *howmuch);
struct save{
float *here;
float *there;
float date;
float quant;
} runstack[Length+1];
int n;
int _tmain(int argc, _TCHAR* argv[])
{
float v1 = 1;
float v2 = 2;
float v3 = 3;
float v4 = 4;
run(v1, v2, v3, v4);
printf("%d %d %d %d \n",v1,v2,v3,v4);
return 0;
}
void run (float *here, float *there, float *date, float *howmuch)
{
n += 1;
if (n > Length)
{
printf("Something wrong!!!");;
exit(1);
}
else
{
runstack[n].here = here;
runstack[n].there = there;
runstack[n].date = *date;
runstack[n].quant = *howmuch;
}
return;
}