I am trying to take a complex number input from the user in a form of a char or string like: 88.90-55.16i or -3.67+5i
and then convert it to float keeping the same format as above. Not (x,y).
char user[100];
vector < float > V;
for (int y = 0; y < 5; y++)
{
cout << "Enter a complex number:" << endl;
cin >> user;
float newfloat = atof(user);
cout << newfloat << endl;
}
Currently its not converting the whole number. Just 88 or -3 from above input examples.