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
posted @ 2012-03-17 20:51 潘小雨 Views(2676) Comments(0) Diggs(0) Edit