自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Capr1corn的博客

命数如织,当为磐石

  • 博客(53)
  • 资源 (2)
  • 收藏
  • 关注

转载 转载 :c++面试基础知识点一

c++编程基础知识点:变量声明和定义区别?声明仅仅是把变量的声明的位置及类型提供给编译器,并不分配内存空间;定义要在定义的地方为其分配存储空间。相同变量可以再多处声明(外部变量extern),但只能在一处定义。“零值比较”?bool类型:if(flag)int类型:if(flag == 0)指针类型:if(flag == null)float类型:if((flag >= -0...

2019-03-18 21:04:21 333

转载 Linux系统编程手册-源码的使用

Linux系统编程手册-源码的使用 转自:http://www.cnblogs.com/pluse/p/6296992.html 第三章后续部分重点介绍了后面章节所要使用的头文件及其实现,主要如下:ename.c.incerror_functions.hget_num.htlpi_hdr.h其中ename.c.inc文件定义了一个字符串...

2019-05-25 15:26:22 664

转载 C++中的new、operator new与placement new

C++中的new、operator new与placement new 作者:阿凡卢出处:http://www.cnblogs.com/luxiaoxun/C++中的new/delete与operator new/operator deletenew operator/delete operator就是new和delete操作符,而operator new/operator ...

2019-04-15 16:06:32 240

转载 转载:C++ 中 new 操作符内幕:new operator、operator new、placement new

转载自:https://www.cnblogs.com/slgkaifa/p/6887887.html一、new 操作符(new operator)人们有时好像喜欢有益使C++语言的术语难以理解。比方说new操作符(new operator)和operator new的差别。 当你写这种代码:string *ps = new string("Memory Manageme...

2019-04-04 16:20:31 193

转载 C++后台开发校招面试常见问题

C和C++语言基础参考书籍:《C++ primer》,《effective C++》,《STL源码解析》,《深度搜索C++对象模型》文章转载自:https://blog.csdn.net/shanghairuoxiao/article/details/72876248extern关键字作用extern声明变量在在外部定义?extern修饰...

2019-03-26 11:09:36 1061

转载 参考别人的面试总结:linux C/C++服务器后台开发面试题总结

参考别人的面试总结:linux C/C++服务器后台开发面试题总结参考博客:http://www.cnblogs.com/nancymake/p/6516933.html基础语言知识方面:1、使用struct关键字和class关键字定义类以及在类的继承方面有啥区别?(1)定义类的差别:C语言中的struct 关键字也可以实现类,用class 关键字和struct 关键字定义类的唯一差...

2019-03-26 11:08:08 627

转载 转:Linux内核学习之系统调用

文章参考Linux内核修炼之道。1. 系统调用概念大家都知道操作系统的作用是管理计算机的软硬件资源,但是操作系统要向用户提供各种各样的服务,而用户应用程序访问这些服务的方式就是通过系统调用。但是一般来说,我们都是通过操作系统封装好的API(应用编程接口)来间接使用系统调用的。比如在Windows编程中,你可以调用WinAPI,他以C库的形式给出。比如在Linux当中,我们调用的read函数:...

2019-03-22 18:15:20 137

转载 C++内联函数

文章转载于:https://www.cnblogs.com/QG-whz/p/4641479.html#_label0正文     在C语言中,我们使用宏定义函数这种借助编译器的优化技术来减少程序的执行时间,那么在C++中有没有相同的技术或者更好的实现方法呢?答案是有的,那就是内联函数。内联函数作为编译器优化手段的一种技术,在降低运行时间上非常有用。我们将从:什...

2019-03-20 10:47:46 162

转载 计算机核心期刊新排名(八大学报)

八大学报1.计算机学报2.软件学报3.计算机科学与技术学报(JCST)4.计算机研究与发展5.自动化学报6.电子学报7.通信学报8.中国科学被SCI检索的国外期刊(顶级会议)新排名 2004部分核心期刊名单(自动化、计算机部分与无线电、电信部分)自动化、计算机部分1 计算机学报 北京 中国计算机学会等2 软件学报 北京 中国科学院软...

2019-03-20 09:57:09 3674

原创 linux网络编程的若干问题

在linux下每一个进程都一个进程id,类型pid_t,可以由getpid()获取。POSIX线程也有线程id,类型pthread_t,可以由pthread_self()获取,线程id由线程库维护。 但是各个进程独立,所以会有不同进程中线程号相同节的情况。那么这样就会存在一个问题,我的进程p1中的线程pt1要与进程p2中的线程pt2通信怎么办,进程id不可以,线程id又可能重复,所以这里会...

2019-03-16 16:32:29 146

转载 转载:__builtin_expect 说明

这个指令是gcc引入的,作用是允许程序员将最有可能执行的分支告诉编译器。这个指令的写法为:__builtin_expect(EXP, N)。意思是:EXP==N的概率很大。一般的使用方法是将__builtin_expect指令封装为likely和unlikely宏。这两个宏的写法如下.#define likely(x) __builtin_expect(!!(x), 1) //x很可能为真...

2019-03-16 16:04:54 135

原创 进程间的通信简介

通信工具通信工具允许进程间相互交换数据,也可以用来不同线程之间交换数据,不过很少使用,一般线程之间通过共享全局变量来交换信息。通信工具可以分为两类:数据传输工具:区分这些工具的关键因素是写入和读取的概念。为了进行通信,一个进程将数据写入IPC工具中,另一个进程从中读取数据。这些工具要求在用户内存和内核内存之间进行两次数据传输:一次传输是在写入的时候从用户内存到内核内存,另一次传输是在读取的...

2019-03-15 20:17:32 432

转载 转载:C++中new和delete的实现原理

原文地址:https://blog.csdn.net/passion_wu128/article/details/38966581new和delete最终调用malloc和free,关于malloc和free实现原理参见这篇文章:http://blog.csdn.net/passion_wu128/article/details/38964045newnew操作针对数据类型的处理,分为...

2019-03-15 11:36:42 119

转载 UDP和TCP的区别

面向报文的传输方式是应用层交给UDP多长的报文,UDP就照样发送,即一次发送一个报文。因此,应用程序必须选择合适大小的报文。若报文太长,则IP层需要分片,降低效率。若太短,会是IP太小。UDP对应用层交下来的报文,既不合并,也不拆分,而是保留这些报文的边界。这也就是说,应用层交给UDP多长的报文,UDP就照样发送,即一次发送一个报文。 面向字节流的话,虽然应用...

2019-03-14 16:39:38 157

原创 [UE4初级游戏开发]笔记一

在利用UE4进行游戏开发之前,需要了解UE4中的整体架构,明白各个类在游戏运行过程中的作用。下面记录一些个人的心得体会:1、在进行游戏开发时,首相需要定义一个自己的GameMode类,利用这个GameMode类来为游戏运行添加组件;通过在UE4客户端,利用world settings来为这个游戏项目制定GameMode。之后再GameMode中为运行的游戏指定选中的游戏模式。2、在C...

2019-02-18 17:15:02 6445

原创 [C++并发编程实战] 阅读笔记第二章:线程管理

第二章、线程管理需要学习的内容:1、启动新线程2、等待线程与分离线程3、 线程唯一标识符2.1 线程管理基础

2019-01-31 11:46:24 232

原创 [LeetCode]941. Valid Mountain Array

Given an array A of integers, return true if and only if it is a valid mountain array.Recall that A is a mountain array if and only if:A.length >= 3There exists some i with 0 < i < A.lengt...

2019-01-18 20:13:21 123

原创 [LeetCode]268. Missing Number

Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.Example 1:Input: [3,0,1]Output: 2Example 2:Input: [9,6,4,2,3,5,7,0,1]Output: ...

2019-01-17 20:52:51 104

原创 [LeetCode]219. Contains Duplicate II

Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k....

2019-01-17 20:34:28 114

原创 [LeetCode]217. Contains Duplicate

Given an array of integers, find if the array contains any duplicates.Your function should return true if any value appears at least twice in the array, and it should return false if every element is...

2019-01-16 21:30:09 112

原创 [LeetCode]189. Rotate Array

Given an array, rotate the array to the right by k steps, where k is non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps to the right: [7,1,2...

2019-01-15 20:54:06 81

原创 [LeetCode]169. Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alway...

2019-01-15 20:31:43 90

原创 ue4工程失去关联的解决方案。

解决办法:1 找到Epic Games下的Launcher目录,寻找lancher->Engine->Binaries->Win64->UnrealVersionSelector.exe2 把UnrealVersionSelector.exe 拷贝到Ue4的版本工程目录,例如UE_4.20->Engine->Binaries->Win643 双击运行...

2019-01-10 13:00:27 5312

原创 [LeetCode]167. Two Sum II - Input array is sorted

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers s...

2019-01-09 21:31:59 331

原创 [LeetCode]121. Best Time to Buy and Sell Stock(股票买卖的最佳时间)

Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), ...

2019-01-08 20:33:26 149

原创 vscode 跳转到函数之后怎么跳转回之前的位置

windows下跳转函数可以采用:alt+左右方向键。但是可能会冲突,建议自定义。

2019-01-08 16:10:57 8975 1

原创 airsim编译出错:fatal error c1001

Hey everyone. Yeah, the issue is with VS 2017 15.9.0, which was released a couple days back on Nov 13.I tested with 15.8.9, and things do compile.Please uninstall 15.9.0 and install 15.8.9, as expla...

2019-01-08 16:05:12 591

原创 [LeetCode]118. Pascal's Triangle

Given a non-negative integer numRows, generate the first numRows of Pascal’s triangle.In Pascal’s triangle, each number is the sum of the two numbers directly above it.Example:Input: 5Output:[ ...

2019-01-07 20:44:46 117

原创 [LeetCode]88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and n respectively.You may assume that n...

2019-01-04 20:29:24 101

原创 [LeetCode]66. Plus One

Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each element ...

2019-01-04 20:01:05 106

转载 opencv相机标定的一些函数讲解

畸变矫正是上一篇博文的遗留问题,当畸变系数和内外参数矩阵标定完成后,就应该进行畸变的矫正,以达到消除畸变的目的,此其一。在该系列第一部分的博文中介绍的立体成像原理中提到,要通过两幅图像估计物点的深度信息,就必须在两幅图像中准确的匹配到同一物点,这样才能根据该物点在两幅图像中的位置关系,计算物体深度。为了降低匹配的计算量,两个摄像头的成像平面应处于同一平面。但是,单单依靠严格的摆放摄像头来达到这...

2019-01-04 11:46:24 1708

原创 [Leetcode] 53. Maximum Subarray(最大子串和问题)

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Output: 6Explanation:...

2019-01-03 22:29:46 173

原创 HTTP协议基础知识

HTTP概要Web服务器端:基于HTTP协议,将网页对应文件传输给客户端的服务器端。HTTP是Hypertext Transfer Protocol的缩写。Hypertext(超文本)是可以根据客户端请求而跳转的结构化信息。这种可跳转的文本称为超文本。HTTP是以超文本传输的目的而设计的应用层协议,这种协议同样也属于基于TCP/IP实现的协议。此外,浏览器也属于基于套接字的客户端,因为连接...

2019-01-02 22:02:20 335

原创 [Leetcode] 35.Search Insert Position(查找插入位置) 题解

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Ex...

2019-01-02 20:46:28 115

原创 [Leetcode] 27. Remove Element(删除元素)题解

Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input array...

2018-12-29 18:48:14 111

原创 [Leetcode] 26、Remove Duplicates from Sorted Array(从有序数组中删除重复项)题解

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifyin...

2018-12-28 20:47:36 108

原创 [Leetcode] 1、Two sum(两数之和)题解

Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use ...

2018-12-27 20:37:39 162

原创 深度探索c++对象模型第六章笔记

执行期语意学(Runtime Semantics)有下面的代码if(yy==xx.getValue())...........其中xx 和yy定义为:X xx;Y yy;class Y定义为:class Y{public: Y(); ~Y(); bool operator==(const Y&) const; //...........};Class ...

2018-12-24 16:29:48 331

原创 深度探索c++对象模型第五章笔记下

5.3 对象复制语意学如果我们设计一个class,并以一个class object指定给另一个class object时,我们有三个选择:1、什么都不做,因此得以实施默认行为;2、提供一个explicit copy assignment operator;3、明确地拒绝把一个class object指定给另一个class object;如果选择第3点,不准将一个class objec...

2018-12-21 18:23:06 165

原创 深度探索c++对象模型第五章笔记上

构造、解构、拷贝语意学(Semantics of Constuction,Destruction,and Copy)假设有以下的代码:class Abstract_base{public: virtual ~Abstract_base()=0;//pure virtual function virtual void interface() const=0; virtual const...

2018-12-21 16:51:26 225

Linux+高性能服务器编程

Linux+高性能服务器编程,可以很好的锻炼自己的linux基础,强化自己在服务器上的编程能力。

2018-08-22

Unix-Linux编程实践教程

linux编程实践教材,可以很好的实践自己在linux下c语言的操作。

2018-08-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除