C/C++
Voyager3
Engineer from ORACLE, China
展开
-
Tokenization in C++11
Preview原创 2017-06-14 10:03:26 · 304 阅读 · 0 评论 -
C++11 - Rvalue reference
Preview原创 2017-06-14 10:01:52 · 576 阅读 · 1 评论 -
Forking and executing process
This passage tells you how to fork a child process and execute another command in child process on Linux.原创 2017-07-12 10:43:29 · 406 阅读 · 0 评论 -
Reverse a binary tree in O(1)
ResumeIs that possible to reverse a binary tree in O(1)? Yes!! Let’s do it right now!Codestruct NormalNode { int value; struct NormalNode *left; struct NormalNode *right;};struct Re原创 2016-05-02 20:37:22 · 416 阅读 · 0 评论 -
Lambda expression in C++ & Haskell || C++ 中的匿名函数 [EN/CN]
[EN]Simple exampleWell, lambda expression is very common technique that we should understand. Here’s a simple example to use lambda expression in C++.Don’t forget to add -std=c++0x parameter to enabl原创 2016-04-06 07:27:24 · 556 阅读 · 0 评论 -
Linux (编程)摘要
Debian 下修改源位置: 打开 /etc/apt/sources.list 后,将第二行注释掉,可以解决 Please insert a media to continue 问题。用 GCC 编译使用 pthread 的代码时,必须使用gcc sourceFile.c -o outputFile -pthread原创 2015-12-02 01:53:24 · 542 阅读 · 0 评论 -
栈 (Stack) 的C++实现(链表方法)
项目源代码本文项目源代码可在此处下载(Visual Studio 2013项目文件):https://github.com/Voyager2718/Blog/tree/master/stack简介栈 (Stack) 是一种先进后出 (LIFO - Last in, first out) 的数据结构。 相对于链表等数据结构,栈的实现难度较低,在特定场合使用效率也比较高 其实栈可以说是一个简单化的单原创 2015-11-22 23:44:56 · 612 阅读 · 0 评论 -
单向链表 (Singly linked list) 的C++实现
链表 (Linked list) 是一种非顺序、非连续的数据结构。链表可以通过一个包含数据和指向其他节点指针的结构体(struct)或类(class)来实现。 这篇文章主要讨论的是单向链表的实现。原创 2015-11-22 08:34:57 · 1513 阅读 · 0 评论 -
与 Visual Studio 共舞
1. LNK4042警告,LNK2001错误除了一些常规的错误以外,还有一个可能是一开始创建的时候是 .cpp/.c 文件,后来直接拓展名变成 .h,但是 Visual Studio 没有对文件属性进行更新,仍然还把新的文件当成是 .cpp/.c . 此时只要将所有代码复制,粘贴到重新新建的 .h 文件就可以了。原创 2015-07-12 23:55:29 · 485 阅读 · 0 评论 -
C++ 技术文章库
C++ 11/14 新特性 标题及链接 来源 评分 备注 右值引用与转移语义 IBM ⭐⭐⭐⭐⭐ 精确传递说得很通俗易懂。 Lambda Expression MSDN ⭐⭐⭐⭐⭐ 介绍了[&]/[=]的用法,介绍了 C++ 14 [ptr = move(pNums)](){}的用法。留意 mutable 在匿名函数内修改值时的作用原创 2018-01-21 13:35:31 · 377 阅读 · 0 评论