#include<iostream>
#include<cmath>
#include<string>
#include<fstream>
using namespace std;
struct Calculations //structure to hold the numbers and operators from 'equation'
{
double num1;
char operators;
double num2;
double answer;
};
Calculations myCalculationArray[SIZE]; // the array of calculations
int main()
{
while (i = 0; i <= 5; i++;)
{
cout << "Enter equation: \n";
getline(cin, equation);
cout << equation;
}
}
Alright so I'm trying to build a calculator where the user inputs an equation like "22/2", then to have it like assign the first number to num1 = ' 22 ' and the operator =' / ' to operators etc.