上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 背景 重学C/C++的小例子,来源《黑马程序员匠心之作|C++教程从0到1入门编程,学习编程不再难》哔哩哔哩 https://www.bilibili.com/video/BV1et411b73Z 成品 源码 链接:https://pan.baidu.com/s/14eovv0EmtqHuC4ZZh 阅读全文
posted @ 2024-07-20 09:48 一个小笨蛋 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 背景 A对象内部属性a属于int ,动态分配内存回收,析构函数delete A ** aptr = new A[10] 申请10个空间长度的A*类型 测试浅拷贝 测试代码 #include<iostream> using namespace std; class A{ public: int* a; 阅读全文
posted @ 2024-07-19 16:16 一个小笨蛋 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 查看类继承属性 代码 阅读全文
posted @ 2024-07-18 09:30 一个小笨蛋 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 示例代码 #include "iostream" //operator+ using namespace std; class A{ public: int m_age; public: A(){} A(int age):m_age(age){} // A operator+(const A &a) 阅读全文
posted @ 2024-07-17 16:17 一个小笨蛋 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 浅拷贝与深拷贝的区别 浅拷贝:简单的赋值拷贝操作 深拷贝:在堆区重新申请空间,进行拷贝操作 默认情况下对象拷贝是浅拷贝(深拷贝要自己实现拷贝函数) class Person { public: //无参(默认)构造函数 Person() { cout << "无参构造函数!" << endl; } 阅读全文
posted @ 2024-07-17 15:29 一个小笨蛋 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 助记 关于 this: this 相当于 * const this; //指向不可更改 关于cstring(常量指针): 指向可以更改,指向的内容不可以更改 string hello = "hello"; string hello2 = "hello2"; const char * hello = 阅读全文
posted @ 2024-07-17 15:17 一个小笨蛋 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.中文输出乱码(只解决输出问题) 解决办法(二选一) #include <iostream> #include "windows.h" using namespace std; // 方法1: // 引入Windows.h // 增加 SetConsoleOutputCP(CP_UTF8); // 阅读全文
posted @ 2024-07-12 04:57 一个小笨蛋 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 背景 Virtualbox动态分配存储,安装虚拟机后,虚拟机越来越大,并且删除文件后并不会回收空间 进入虚拟机执行命令 sudo dd if=/dev/zero of=/EMPTY bs=1M sudo rm -f /EMPTY 退出虚拟机 新建一个bat文件 clear_vdi.bat "C:\P 阅读全文
posted @ 2024-07-08 14:15 一个小笨蛋 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 前置准备 root 环境下执行 # 关闭selinux vi /etc/selinux/config # SELINUX=enforcing =>SELINUX=disabled # 开通防火墙3306/tcp firewall-cmd --permanent --add-port=3306/tcp 阅读全文
posted @ 2024-07-06 11:09 一个小笨蛋 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 引入依赖 <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> <version>2.0.24</version> </dependency> 配置文件 PdfWatermarkProper 阅读全文
posted @ 2024-07-05 15:01 一个小笨蛋 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页