First of all I have to say that i have no experience with C My problem is I needed to write a make file to seperate 2 functions wrote like this before ;
#include <math.h>
#include <iostream>
using namespace std;
int main()
{
float A,B,x,y;
int z;
x=-0.62;
y=0.82;
z=25;
A = pow(y, cbrt(double x)) + sin(y - 3) * sin(y - 3) * sin(y - 3);
B = y * (atan(z) - (atan(1) * 4 / 6)) / x + 1 / (pow(y, 2) + 1);
cout << "your answer for A = " << A << endl;
cout << "your answer for B = " << B << endl;
}
In this point all is good and code is working , but when i try to seperate the functions like this its function A;
float A(float *x, float *y,int *z){
A = pow(y, cbrt(double x)) + sin(y - 3) * sin(y - 3) * sin(y - 3);
return A;
}
And its B;
#include <math.h>
#include <iostream>
using namespace std;
int B(float *x,*y,int *z){
B = y * (atan(z) - (atan(1) * 4 / 6)) / x + 1 / (pow(y, 2) + 1);
return B;
}
Here is my main function;
#include <math.h>
#include <iostream>
using namespace std;
int main()
{
float A,B,x,y;
int z;
x=-0.62;
y=0.82;
z=25;
float A(x,y,z);
float B(x,y,z);
cout << "your answer for A = " << A << endl;
cout << "your answer for B = " << B << endl;
}
I get various amount of errors such as 'no known conversion' or 'pow not defined' how can i solve it ? I am pretty sure its about my variables and how i call them but.