Assignment followed by my program files currently.
I am getting an error code w/ no specific lines. Might be an issue with my #include.
I'm stuck and would appreciate any helpful comments.
Design a class named quadratic that represents a polynomial of degree 2. Here is the
form of a quadratic polynomial.
p = ax2 + bx + c, a, b, c ∈ ℜ and a ≠ 0
Use your quadratic class to perform the following tasks.
1. Solve quadratic equations.
2. Compute the sum of two quadratics using an overloaded operator +.
3. Evaluate the two quadratics at a value, x.
Values a1, b1, c1 and a2, b2, c2 for two quadratics and a value x to evaluate both
1. Two quadratics in tuple form (a, b, c).
2. The results computed from the sum of the two input quadratics.
3. The results of the two quadratics when evaluated at the point x.
4. The real solutions to both quadratics as given by the quadratic formula.
Please include all your code in [ Code] [ /Code] tags to make it easier to read.
Pasting as much of the error as you can can still help us (even if it doesn't give specific line numbers).
From the code you have given it doesn't look like you are including anything in your .cpp files. For example in quadratic.cpp you need to include quadratic.h or else your main function wont be able to see any of the functions when they all get linked together.
You need parenthesis on all functions calls, check stuff like cout << "Solution to Quadratic 1: " << _A.solveQuadratic_plus << endl;
(There are quite a lot of mistakes with this).
You can't add endl onto the end of cin like this. std::cin >> A >> std::endl;