We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1480525631---1.48053e+09
std::string ConvertToString(double t) { std::stringstream sstream; sstream << t; return sstream.str(); }
int main(int argc, char *argv[]) { time_t t = time(NULL); double dt = (long) t; std::cout<<std::to_string((int)t)<<"---"<<dt<<std::endl; std::cout<<ConvertToString(dt)<<"---"<<std::endl; return 0; } /opt/work/debug $ ./hh 1480525631---1.48053e+09 1.48053e+09--- /opt/work/debug $
The text was updated successfully, but these errors were encountered:
#include >
std::string ConvertToString(double t) { std::stringstream sstream; sstream << std::fixed << t; return sstream.str(); }
Hope this is helpful.
Sorry, something went wrong.
No branches or pull requests
1480525631---1.48053e+09
std::string ConvertToString(double t)
{
std::stringstream sstream;
sstream << t;
return sstream.str();
}
int main(int argc, char *argv[])
{
time_t t = time(NULL);
double dt = (long) t;
std::cout<<std::to_string((int)t)<<"---"<<dt<<std::endl;
std::cout<<ConvertToString(dt)<<"---"<<std::endl;
return 0;
}
/opt/work/debug $ ./hh
1480525631---1.48053e+09
1.48053e+09---
/opt/work/debug $
The text was updated successfully, but these errors were encountered: