
零基础学 C++
涂鸦c
这个作者很懒,什么都没留下…
展开
-
QT 5.14.1 生成DLL和调用
1.创建一个DLL 在文件testDLL.h修改 #ifndef TESTDLL_H #define TESTDLL_H #include "TestDll_global.h" class TESTDLL_EXPORT TestDll { public: TestDll(); int add(int a, int b); }; #endif // TESTDLL_H testDLL.cpp #include "testdll.h" Test...原创 2021-11-03 15:22:09 · 347 阅读 · 0 评论 -
零基础学 C++ 12 函数模板
#include <iostream> using namespace std; template <class type, int len> //定义一个模板类型 type Max(type array[len]) //定义函数模板 { type ret = array[0]; //定义一个变量 for (int i = 1; i < len; i++) //.原创 2021-11-03 13:36:51 · 108 阅读 · 0 评论 -
零基础学 C++ 13.1序列容器
#include <iostream> #include <vector> #include <tchar.h> using namespace std; int main(int argc,_TCHAR* argv[]) { vector<int> v1, v2; //定义两个容器 v1.reserve(10); //手动分配空间,设置容器元素最小值 v2.reserve(10); v1 = vector<int>.原创 2021-11-03 10:51:41 · 209 阅读 · 0 评论