Simple calculator using command line with C++

后端 未结 5 442
遇见更好的自我
遇见更好的自我 2021-01-26 10:57

I\'m writing a project that we do simple calculator from command line. The users input in this format programname firstNumber operator secondNumber. Here what I

5条回答
  •  再見小時候
    2021-01-26 11:43

    In addition to @meneldal suggestion, you can also use stringstream in C++ to convert from string to number

    double value;
    stringstream(someString) >> value;
    

提交回复
热议问题