?? source.h
字號:
#ifndef SOURCE_H#define SOURCE_H#include <stdio.h>#include <stdlib.h>#include <malloc.h>#include <iostream.h>#include "util.h"#define MAXLEN 4096typedef float Description;class Source {private: FILE *handle; char *fname; char delimiter[1024]; char *where, *buffer; int n_Instances; // the number of rows int n_Descriptions; // the number of columnspublic: Source(char delim[]=",", char *fname=NULL); void init(); // reset the file pointer to the beginning Description readDescription(); // read a description void setDelimiter(char *delim) { strcpy(delimiter, delim); } int numOfInstances() { return n_Instances; } int numOfDescriptions() { return n_Descriptions; } // status() will give a status after read a char from the // input Description *readOneInstance(); char *getFileName() { return fname; }private: int countInstances(); int countDescriptions(); // class column also counted};#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -