nev*_*int 1 c++ decimal argument-passing
我有这个:
double myDecimal = static_cast<double>(atoi(arg_vec[1]));
cout << myDecimal << endl;
Run Code Online (Sandbox Code Playgroud)
但是当我传递这样的论点时为什么呢:
./MyCode 0.003
Run Code Online (Sandbox Code Playgroud)
它打印0而不是0.003.