文字列入力をスイッチ ケース パラメーターとして取得するにはどうすればよいですか? 私はint文字列ではなくそれを行うことができます。
入力を使用している場合、以下のコードは機能しますintが、文字列に変更すると機能しません。
#include <iostream>
#include <sstream>
#include <string>
#include <math.h>
class MissionPlan //start of MissionPlan class
{
    public:
    MissionPlan();
    float computeCivIndex(string,int,int,float,float);
}; //end of MissionPlan class
LocationData::LocationData()
{
    switch(sunType)
    {
        case "Type A": //compute 
                      break;
        case "Type B": //compute
                       break;
         //and many more case..
        default: break;
    }
}
int main()
{
    for(;;)
    {
    MissionPlan plan;
    }
    return 0;
}