摘要:
https://blog.csdn.net/guyuealian/article/details/111259876 阅读全文
posted @ 2022-03-23 21:13
小kk_p
阅读(55)
评论(0)
推荐(0)
摘要:
https://zhuanlan.zhihu.com/p/37340242 阅读全文
posted @ 2022-03-23 10:20
小kk_p
阅读(22)
评论(0)
推荐(0)
摘要:
看《effective c++》,作者一直强调用std::tr1::shared_ptr,比起auto_ptr好多了。 shared_ptr采用引用计数,多个指针可以指向同一个对象;auto_ptr就不能,只能运行一个指针指向一个对象:如果要指针赋值,那么原来的指针要放弃对该对象的所有权。 恩,以后 阅读全文
posted @ 2022-03-22 21:54
小kk_p
阅读(286)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> using namespace std 阅读全文
posted @ 2022-03-20 13:55
小kk_p
阅读(97)
评论(0)
推荐(0)
摘要:
单个源文件生成可执行程序 下面是一个保存在文件 helloworld.cpp 中一个简单的 C++ 程序的代码: 单个源文件生成可执行程序 /* helloworld.cpp */ #include <iostream> int main(int argc,char *argv[]) { std:: 阅读全文
posted @ 2022-03-20 12:45
小kk_p
阅读(1777)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <functional> using namespace std; int TestFunc(int a, char c, float f) { cout << a << endl; cout << c << endl; cout << f 阅读全文
posted @ 2022-03-19 20:41
小kk_p
阅读(69)
评论(0)
推荐(0)
摘要:
#include <stdio.h> typedef int(*callback)(int, int); //声明函数指针 typedef struct A { int a; int b; }; int add(int a, int b, callback p){ return (*p)(a, b) 阅读全文
posted @ 2022-03-19 17:51
小kk_p
阅读(63)
评论(0)
推荐(0)
摘要:
创建动态库方法: 创建动态库是生成 .dll .lib 两个个文件 文件 -> 新建 -> 项目 -> win32控制台应用程序 项目名称:DLLGenerator 应用程序类型:DLL 附加选项:空项目 建立源文件dllgenerator.cpp(不需要主函数,只写你需要动态调用的函数) // 整 阅读全文
posted @ 2022-03-19 15:02
小kk_p
阅读(964)
评论(0)
推荐(0)
摘要:
第一步:模型转换,按照github一步一步来就ok了~此处无坑 第二步:cmake建立vs工程,需要在cmakelist里面需要使用的accelerator,否则在getdevice会返回NULL值 第三步:调用 #include "tnn/utils/dims_vector_utils.h" #i 阅读全文
posted @ 2022-03-18 22:14
小kk_p
阅读(470)
评论(0)
推荐(0)
摘要:
https://www.jianshu.com/p/cb4f8136a265 阅读全文
posted @ 2022-03-18 11:11
小kk_p
阅读(24)
评论(0)
推荐(0)