hwrecordc.cc
来自「手写识别是模式识别中研究得一个热点」· CC 代码 · 共 56 行
CC
56 行
#include "HWRecordC.hh"#define MYDEBUG 0ostream& operator << (ostream& outfile, HWHeaderC Header){ outfile << Header.Magic << '\n' << Header.String << '\n'; return outfile;}ostream& operator << (ostream& outfile, HWRecordC Record){ outfile << Record.Type << ' ' << Record.Time; if (Record.Type == 0) { outfile << ' ' << Record.DataPoint.XPos << ' ' << Record.DataPoint.YPos << ' ' << Record.DataPoint.XTilt << ' ' << Record.DataPoint.YTilt << ' ' << Record.DataPoint.Pressure; } outfile << '\n'; return outfile;}istream& operator >> (istream& infile, HWHeaderC& Header){ cout << "x1\n"; infile >> Header.Magic >> '\n' >> Header.String >> '\n'; cout << "x2\n"; return infile;}istream& operator >> (istream& infile, HWRecordC& Record){ if (MYDEBUG) cerr << "Start read: " << infile.tellg() << '\n'; infile >> Record.Type >> Record.Time; if (MYDEBUG) cerr << "Read, type = " << Record.Type << '\n'; if (Record.Type == 0) { infile >> Record.DataPoint.XPos >> Record.DataPoint.YPos >> Record.DataPoint.XTilt >> Record.DataPoint.YTilt >> Record.DataPoint.Pressure; } if (MYDEBUG) cerr << "End read: " << infile.tellg() << '\n'; return infile;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?