- 博客(10)
- 资源 (4)
- 收藏
- 关注
原创 C/C++ sstream和fstream
ostringstream #include <string> #include <iostream> #include <sstream> using namespace std; int main() { ostringstream ostr1; ostr1 << "123" << endl;//换行也加入 ...
2019-08-20 17:15:58 351
原创 caffe
cmake安装 ubuntu 环境准备(依赖包) $ sudo apt-get install git $ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler $ sudo apt-get install --no...
2019-08-19 12:02:39 86
原创 C/C++ 左值与右值
左值、左值引用、右值、右值引用 左值和右值的概念 左值是可以放在赋值号左边可以被赋值的值;左值必须要在内存中有实体; 右值当在赋值号右边取出值赋给其他变量的值;右值可以在内存也可以在CPU寄存器。 一个对象被用作右值时,使用的是它的内容(值),被当作左值时,使用的是它的地址。 引用 引用是C++语法做的优化,引用的本质还是靠指针来实现的。引用相当于变量的别名。 引用可以改变指针的指向...
2019-08-14 11:28:30 95
原创 C/C++ operator关键字
#include <iostream> using namespace std; class Matrix{ float *data; public: size_t n,m; Matrix(size_t r,size_t c):data(new float[r*c]),n(r),m(c){} ~Matrix() {delete[] data;} ...
2019-08-13 14:52:26 204
原创 C/C++ 异步调用
#include <future> #include <iostream> #include <string> std::string helloFunction(const std::string& s) { return "Hello C++11 from " + s + "."; } class HelloFunctionObject ...
2019-08-12 14:37:27 2024 1
原创 C/C++编译
sample2.cpp #include "sample2.h" #include <string.h> //克隆一个0-terminated C string, 用new分配内存. const char* MyString::CloneCString(const char* a_c_string) { if (a_c_string == NULL) return NUL...
2019-08-12 12:10:58 79
原创 C/C++模版编程
1 class TestBase { public: virtual ~TestBase() {} virtual void FuncA(int param) = 0; virtual bool FuncB(int param) = 0; }; template<typename T> class TestA: public TestBase { pub...
2019-08-12 11:47:33 153
原创 C/C++ 测试
test_01.cpp #include <gtest/gtest.h> #include <stdio.h> using testing::Types; template <class T> class TypeTest : public testing::Test { public: bool CheckData() { if (ty...
2019-08-11 19:35:55 162
原创 C/C++虚函数和纯虚函
虚函数和纯虚函 #include <iostream> using namespace std; class A { public: virtual void out1()=0; ///由子类实现 virtual ~A(){}; virtual void out2() ///默认实现 { cout<<"A(out2)"&l...
2019-08-09 17:52:42 184
10-batches-py.tar.gz
2020-07-17
VC6LineNumberAddin.rar
2020-04-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人