随笔分类 - C/C++
摘要:cin/cin.get/cin.getline与输入缓冲区 从键盘读入的几种方式 #include <iostream> #include <string> using namespace std; int main(){ char a[20]; cout<<"cin读取 "<<endl; //输入
阅读全文
摘要:1 #include <iostream> 2 #include <fstream> 3 #include <string.h> 4 #include <vector> 5 #include <sys/io.h> 6 #include <dirent.h> 7 #include <stdlib.h>
阅读全文
摘要:1 cv::PCA pca(samples, cv::Mat(), cv::PCA::DATA_AS_ROW,100); 2 FileStorage fs("pca.xml",FileStorage::WRITE); 3 pca.write(fs); 4 fs.release(); 1 FileStorage fs("pca.xml",FileStorage::READ); 2...
阅读全文
摘要:gcc编译流程: test.c >test.cxx(预编译) >test.s(asm文件) >test.o(obj文件) >test(exe) (-E) (-S) (-c) 链接 test.c | test_a.cproject-| | h_test.h | test_b.c | test_c.c
阅读全文
摘要:C语言输入输出流和缓冲区 C语言缓冲区(缓存)详解缓冲区又称为缓存,它是内存空间的一部分。也就是说,在内存空间中预留了一定的存储空间,这些存储空间用来缓冲输入或输出的数据,这部分预留的空间就叫做缓冲区。缓冲区根据其对应的是输入设备还是输出设备,分为输入缓冲区和输出缓冲区。 为什么要引入缓冲区比如我们
阅读全文