⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makebin.cc

📁 clique code with sample data set. clique is a data clustering algorithm which follows hierarchical c
💻 CC
字号:
#include <errno.h>#include <iostream.h>#include <stdio.h>#include <fstream.h>#include <strstream.h>#include <stdlib.h>#include <fcntl.h>#include <sys/stat.h>#include <unistd.h>#include <math.h>#define ITSZ sizeof(int)const int lineSize=8192;const int wdSize=256;ifstream fin;ofstream fout;void convbin(char *inBuf, int inSize){   char inStr[wdSize];   istrstream ist(inBuf, inSize);   int it;   while(ist >> inStr){      it = atoi(inStr);      cout << it  << " ";      fout.write((char*)&it, ITSZ);   }   cout << endl;}int main(int argc, char **argv){   char inBuf[lineSize];   int inSize;   fin.open(argv[1]);   if (!fin){      perror("cannot open in file");      exit(errno);   }   fout.open(argv[2]);   if (!fout){      perror("cannot open out file");      exit(errno);   }      while(fin.getline(inBuf, lineSize)){      inSize = fin.gcount();      cout << "IN SIZE " << inSize << endl;      convbin(inBuf, inSize);   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -