I am trying to make a gpa calculator for a class and I am having trouble figuring out how to convert the character values for the user to input into floats.
#include<iostream>
using namespace std;
int main()
{
float A = 4.0;
string G162;
floatG1621 = 0;
cout << "Grade?";
cin >> G162;
cin.ignore();
if(G162 == "A")
{
G1621 = 4.0;
}
cout << G1621 // this is an abbreviated version of the code, but for some reeason it isn't showing the 4