会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
放飞梦想C
学习是一种信仰!
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
12
13
14
···
19
下一页
2021年7月11日
最大堆(MaxHeap)
摘要: 性质 二叉堆是一颗完全二叉树,而完全二叉树是把元素排列成树的形状。 堆中某个节点的值总不大于其父节点的值最大堆(相应的可以定于最小堆) // 返回完全二叉树的数组表示中,一个索引所表示的元素的父亲节点的索引 constexpr int parent(const int index) const {
阅读全文
posted @ 2021-07-11 19:06 放飞梦想C
阅读(1004)
评论(0)
推荐(0)
2021年7月6日
双向循环链表(DoubleLoopLinkList)
摘要: 双向循环链表 关于双向循环链表可以先阅读这篇文章这里就不再赘述:双向链表(DoubleLinkList) Node template<typename T> class Node { public: T e; Node *prev; Node *next; Node() : e(0), prev(n
阅读全文
posted @ 2021-07-06 16:48 放飞梦想C
阅读(237)
评论(0)
推荐(0)
双向链表(DoubleLinkList)
摘要: 双向链表 有关链表的知识可以点击我上篇文章这里就不再赘述LinkedList 双向链表也叫双链表,是链表的一种,它的每个数据结点中都有两个指针,分别指向直接后继和直接前驱。所以,从双向链表中的任意一个结点开始,都可以很方便地访问它的前驱结点和后继结点。一般我们都构造双向循环链表。 双向循环链表的可以
阅读全文
posted @ 2021-07-06 16:21 放飞梦想C
阅读(391)
评论(0)
推荐(0)
2021年6月29日
可执行程序的编译过程
摘要: 源文件 #include<stdio.h> int main() { printf("hello world!"); return 0; } 预处理 使用以下命令把.c文件进行宏展开生成.i文件 gcc -E main.c -o main.i 编译器对各种预处理命令进行处理,包括头文件包含、宏定义的
阅读全文
posted @ 2021-06-29 15:25 放飞梦想C
阅读(142)
评论(0)
推荐(0)
2021年6月28日
C语言文件操作
摘要: 引入的头文件io_utils/time_utils 文件字符个数 #include<stdio.h> #include<locale.h> #include<wchar.h> #include"../include/io_utils.h" #define ERROR_ILLEGAL_FILENAME
阅读全文
posted @ 2021-06-28 20:25 放飞梦想C
阅读(83)
评论(0)
推荐(0)
C语言跨平台时间操作计算时间差
摘要: 头文件 #pragma once #if defined(_WIN32) #include<sys/timeb.h> #if defined(__UNIX__)||defined(__APPLE__) #include<time.h> #endif typedef long long long_ti
阅读全文
posted @ 2021-06-28 20:23 放飞梦想C
阅读(224)
评论(0)
推荐(0)
C语言线程安全问题
摘要: 线程安全问题 #include <stdio.h> #include <tinycthread.h> #include <io_utils.h> int count = 0; int Counter(void*arg) { for(int i = 0;i<100000;i++) { count++;
阅读全文
posted @ 2021-06-28 20:03 放飞梦想C
阅读(480)
评论(0)
推荐(0)
2021年6月17日
C++类型双关
摘要: Σ(っ °Д °;)っ #include<iostream> struct Entity { int x, y; int* GetPtr() { return &x; } /*Entity* GetPtr() { return this; }*/ }; int main() { Entity e =
阅读全文
posted @ 2021-06-17 15:54 放飞梦想C
阅读(106)
评论(0)
推荐(0)
Fast多维数组
摘要: #include<iostream> #include<chrono> struct Timer { std::chrono::time_point<std::chrono::steady_clock>start, end; std::chrono::duration<float>duration;
阅读全文
posted @ 2021-06-17 15:07 放飞梦想C
阅读(49)
评论(0)
推荐(0)
2021年6月16日
C++ 自动计时
摘要: #include<iostream> #include<chrono> struct Timer { std::chrono::time_point<std::chrono::steady_clock>start, end; std::chrono::duration<float>duration;
阅读全文
posted @ 2021-06-16 20:26 放飞梦想C
阅读(87)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
13
14
···
19
下一页
公告