### Completely lost

So I have an asignment in which my teacher is wanting us to find the derivative and the integral of a function using pointers, however, I am struggling to understand where and how to use pointers. Can anyone help me?

 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283`` ``````#include #include #include "Poly.h" #include "Keyboard.h" using namespace std; int main() { char file_name[25]; double Function; int max_length = 20; double * poly; int degree; readPoly(file_name, degree, max_length); polyDerivative(poly, degree); polyIntegral(poly, degree); double poly_coeffs[degree]; printPoly(poly_coeffs, degree); return 0; } double* readPoly(char file_name[], int& degree, int max_length) { readString("Enter the file containing the polynomial coefficients: ", file_name, max_length); ifstream input_file; input_file.open(file_name); input_file >> degree; double* ptr = new double [degree + 1]; for (int i = degree; i >= 0; i--) { input_file >> ptr[i]; } input_file.close(); return ptr; } double* polyDerivative(double* poly, int degree) { for (int i = degree; i >= 0; i--) { } cout << "The derivative of the polynomial: " << endl; } double* polyIntegral(double* poly, int degree) { for (int i = degree; i >= 0; i--) { } cout << "The integral of the polynomial (integration constant set to 0): " << endl; } void printPoly(double poly_coeffs[], int degree) { cout << "The polynomial you entered: " << endl; for(int i = degree; i > 0 ; i--) { cout << poly_coeffs[i] << "x^" << i << " + "; } cout << poly_coeffs[0] << "x^0" << endl; } }``````
Last edited on
Of course the polyDerivative and the polyIntegral functions are incomplete due to readPoly being incomplete.