File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 33* .png
44* .zip
55* .S
6- * .txt
6+ * .txt
7+ /build
Original file line number Diff line number Diff line change @@ -98,7 +98,9 @@ int CCOMPACT3::loadfile(string pfile)
9898 {
9999 for (int i = 0 ; i < xRecord->num ; ++i)
100100 {
101- word >> (xRecord->fvalue [i]);
101+ std::string temp;
102+ word >> temp;
103+ xRecord->fvalue [i] = std::strtof (temp.c_str (), NULL );
102104 }
103105 m_vRecord.push_back (xRecord);
104106 }
Original file line number Diff line number Diff line change 1- // test.cpp : 定义控制台应用程序的入口点。
1+ // test.cpp : �������̨Ӧ�ó������ڵ㡣
22//
33
44#include " COMPACT3.h"
55
66int main (int argc, char * argv[]) {
77 CCOMPACT3 compacts3;
8- compacts3.loadfile (" ..//TESTDATA//o.m12 " );
8+ compacts3.loadfile (" ..//..//data//data.d12 " );
99 for (int i=0 ;i<compacts3.count ();++i) {
1010 const CCOMPACT3Record * record = compacts3.get (i);
11- printf (" %d\n " , record->num );
11+
12+ for (int j=0 ;j<record->num ;++j)
13+ {
14+ printf (" %f " , record->fvalue [j]);
15+ }
16+ printf (" \n " );
1217 }
1318 return 0 ;
1419}
You can’t perform that action at this time.
0 commit comments