I am completely lost on the whole structure thing. My teacher only taught it to us for less than an hour and then gave us this. Anything will help right now as I don't even know where to begin. Thanks in advance.
//re-write the program below using structure types
//make two structures, one for cefficient, and the other for roots
//modify the functions so that reference parameters are not used
#include <iostream>
#include <conio.h>
#include <cmath> // for sqrt function
#include <iomanip> // for setprecision(2) etc
using namespace std;
The structure for coefficients should just have 3 floats (a b c) and the structure for roots should have 2 floats (x1 x2). Once you've got those, try to figure out how you can modify those functions to not need pass by reference (hint: you'll be returning a struct instead).
You should define those between using namespace std; and your function prototypes. Then, in main, you can declare them just like any other variable (e.g. coefficient myCoef;).
The coefficient and roots variables you create should replace your current variables in mian, yes.
Don't know if you still need help on this, but you need to declare coefficient and root variables in main. Also, you need to change your functions to match your instructions (no references) while still getting the values out of the function. getInput should return a coefficient and have no parameters. solveEquation should have a coefficient as parameter and return a roots. displayResult can stay as-is.