1 保留小数点后两位#include <iomanip>cout << setiosflags(ios::fixed) << setprecision(2)<< getAdd(num) << endl;2 截取字符串 类似spilt#include <string>const char * spilt="/";char *p;p=strtok(str,spilt);while(p!=NULL){ //cout << p << endl; num[i++]=atoi(p); p=s Read More