#include <iostream.h>
#include <string>
#include <math.h>
usingnamespace std;
int main()
{
char cselect, sselect;
cout << "Hello, and welcome to Saad's Geometry Homework Helper APLHA 1.0" << endl;
cout << "To calculate SA and V of spheres enter <s>, to minimize SA press <a>, to maximize volume press <v>" << endl;
cin >> cselect;
if (cselect = "s"){
cout << "You have selected SA and V of spheres calculator. If you would like to calculate the SA, press <s>, otherwise <v> for volume" << endl;
cin << sselect;
}
elseif (cselect = "a"){
cout << "You have selected minimizing surface area. For cylinders press <c>, otherwise <p> for prisms." << endl;
}
elseif (cselect = "v"){
cout << "You have selected maximizing volume. For cylinders press <c>, otherwise <p> for prisms." << endl;
}
return 0;
}
So I tried what you guys said, which was changing (cselect = "s") to (cselect == "s"), but it still doesn't work. For that same line (line 14) it says:
"ISO C++ forbids comparison between pointer and integer"