kazama

使用sprintf   头文件    #include<stdio.h>

栗子

 

#include<iostream>
#include<iomanip>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
int main() {
    double a = 0.5555;
    char s[20];
    sprintf_s(s, "%.6lf", a);
    cout << s;
    system("pause");
    return 0;
}

 

哈哈哈哈真的神器妈的

早知道用这个我就不会在字符串上吃这么多亏了

 

分类:

技术点:

相关文章:

  • 2022-02-09
  • 2022-12-23
  • 2021-12-18
  • 2021-10-04
  • 2022-01-29
  • 2021-11-13
  • 2022-01-18
猜你喜欢
  • 1970-01-01
  • 2022-02-10
  • 2021-11-15
  • 2021-12-01
  • 2021-08-20
  • 2021-12-04
  • 2021-12-04
相关资源
相似解决方案