摘要: 函数指针的概念 顾名思义,函数指针就是指向函数的指针,该指针的值是函数的入口。下面的代码时函数指针的一个基本实例。 #include <stdio.h> int max_(int a, int b); int max1_(int (*func_p)(int, int), int a, int b); 阅读全文
posted @ 2023-09-22 23:13 Guanjie255 阅读(155) 评论(0) 推荐(0)
摘要: 也许一个不兼容的指针可以访问变量 #include <stdio.h> #include <stdlib.h> typedef struct father { int age; char* name; } father; typedef struct student { int age; doubl 阅读全文
posted @ 2023-09-22 23:13 Guanjie255 阅读(33) 评论(0) 推荐(0)
摘要: 1. 所谓override,就是子类中重新实现了父类中的某一方法(子类和父类的同一个方法的方法体不同) 2. 所谓多态,最显著的一个特点就是父类指针指向不同的子类对象时,运行同一个方法会有不同的行为 3. C语言模拟继承时,父类对象必须是子类对象的第一个成员 4. 理解了C的父类结构体指针子类结构体 阅读全文
posted @ 2023-09-21 14:30 Guanjie255 阅读(250) 评论(0) 推荐(0)
摘要: ### 1.[cppreferecne][1] ![](https://img2023.cnblogs.com/blog/2935053/202308/2935053-20230830162836694-21630596.png) ### 2.[stackoverflow][2] ![](https 阅读全文
posted @ 2023-08-30 16:30 Guanjie255 阅读(34) 评论(0) 推荐(0)
摘要: ##引用(reference)的优缺点(以int &b = a;为例) * 1.引用的底层是指针:(b本质上是指向a的指针),但是程序员可以把引用b当作对象a的别名,也就是可以当作一个普通的变量使用。 * 2.引用有更加安全和高效的特性:b只能指向a,也就是说,b不能再引用其他的对象了,这一点和指针 阅读全文
posted @ 2023-08-30 16:04 Guanjie255 阅读(165) 评论(0) 推荐(0)
摘要: # 涉及的Linux知识包括 * 1.login shell与non-login shell * 2.TERM变量的作用:终端的类型 * 3.PS1变量的作用:设置提示符(prompt)的颜色 ## 一、login shell与non login shell ### 1.通过xshell这个软件登录 阅读全文
posted @ 2023-08-28 12:09 Guanjie255 阅读(603) 评论(0) 推荐(0)
摘要: ## 目标:一段时间鼠标没有移动,则隐藏游标(cursor) ## 1.安装unclutter-xfixes(unclutter的修复版) ```shell $ sudo apt-get update $ sudo apt-get install unclutter-xfixes ``` ## 2. 阅读全文
posted @ 2023-08-24 19:24 Guanjie255 阅读(1314) 评论(0) 推荐(0)
摘要: ## 前言 我的这篇[博客][1]已经介绍了如何使用hide top bar隐藏顶部导航栏目,但是在桌面的状态下,顶部导航栏依然存在,如下图。因此使用hide panel lite这个插件。hide panel lite全局隐藏顶部导航栏(除了在overview窗口) ![](https://img 阅读全文
posted @ 2023-08-24 18:02 Guanjie255 阅读(1878) 评论(0) 推荐(1)
摘要: ## 翻译自[博客][1] ## 1.将下载的chrome安装包放在~/Downloads文件夹下 ```shell $ cd ~/Downloads # wget是一个下载工具 $ wget https://dl.google.com/linux/direct/google-chrome-stab 阅读全文
posted @ 2023-08-24 17:17 Guanjie255 阅读(1198) 评论(0) 推荐(0)
摘要: ## 1.问题描述:在fireforx浏览器上安装好了ghelper插件,但是无法打开google.com ## 2.问题解决 * 1.尝试更换一个代理路线 * 2.尝试打开google.com.hk or youtube.com 阅读全文
posted @ 2023-08-24 14:57 Guanjie255 阅读(543) 评论(0) 推荐(0)