
C/C++
文章平均质量分 58
mars_linux
I am just a nobody. However, i know the truth that no pain, no gain. If you have tried your best, there are always something special belong to you.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Beautiful Design of C++ Design
给定一个类型,可能是内置类型,也或许是class。C++给出了办法判断是否定义了相应的迭代器型别template <class _Tp>struct __has_iterator_typedefs{private: struct __two {char __lx; char __lxx;}; template <class _Up> static __two __test(...); template <class _Up> static原创 2020-08-02 17:44:51 · 240 阅读 · 0 评论 -
Print Calendar
1. Zeller Formulation it's wonderfull. https://www.zhihu.com/question/42879877/answer/5931027042. Calendar Print#include <iostream>#include <cstdbool>#include <iomanip>#include <string>#include <vector>using nam..原创 2020-07-05 11:41:45 · 307 阅读 · 0 评论 -
getchar() 与 getch()
getchar()与getch()这两个函数都是读一个字符,但是它们有一个重要的差别,下面我在vs2010平台举例子来说明:example_01.c#include<stdio.h>#include<conio.h>int main(void){ char ch; while((ch=getchar()) != '\n') { p...原创 2015-08-11 14:26:03 · 644 阅读 · 0 评论 -
《让makefile变得简单》系列--第一章
引言makefile是一种文件类型,它指导怎么编译并且链接程序。所以,makefile文件只是告诉make怎么去执行。在本章节中,我们讨论一个简单的makefile,它描述了怎么编译和链接text editor。texteditor包含了8个C源文件和3个H文件。它还可以在makefile显式指定了命令时执行更加复杂的命令。当make根据makefile编译文件时,如果文件发生了变动,那么文...翻译 2019-07-28 00:29:09 · 219 阅读 · 0 评论 -
《让makefile变得简单》系列--第二章--让我们来写一个makefile
一个完整的makefile包含了什么显示规则隐式规则变量指令或者命令注释分行这里描述2个概念:逻辑行、物理行逻辑行:比如你在编程时,一行赋值语句,一行if判断语句都是逻辑行,它可以很长,占用多个物理行,也可以很短,不足一个物理行。物理行:编辑器上你看到的一行就是物理行。在makefile文件的语法规则中,如果逻辑行过长,影响阅读。可以使用‘\’分行,把一个逻辑行拆成多个物理...原创 2019-08-04 21:39:54 · 236 阅读 · 0 评论 -
多线程编程
线程创建线程pthread_create /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */...翻译 2019-01-09 17:02:45 · 274 阅读 · 0 评论 -
编程时要用到的按键ASCII码值
ASCII码值 控制字符 ASCII码值 控制字符 ASCII码值 控制字符 ASCII码值 控制字符 0 NUT 32 64 96 1 SOH 33 65 97 2 STX 34 66 98...翻译 2019-01-09 09:22:13 · 365 阅读 · 0 评论 -
c++知识点累积
输入输出输入cin >>跳过空白字符(空格、换行符、制表符)。#include <iostream>#include <string>int main(){ using std::cout; using std::cin; using std::endl; using std::string; string tmp("");...原创 2019-01-08 18:21:27 · 266 阅读 · 0 评论 -
利用ctag+cscope+taglist+Nerdtree打造功能等价于sourceinsight的内核代码阅读神器
注:网络上关于利用ctag+cscope+taglist+Nerdtree打造功能等价于sourceinsight的博文数不胜数,本人这篇博文谈不上锦上添花,更遑论雪中送炭。把这个打造过程记录下来,仅仅只是希望能够为他人提供些许帮助,对我个人而言就已经很开心了。1. 环境描述ubuntu16.04 LTS,64操作系统。2.安装ctag,cscope$sudo apt-get ins...原创 2018-04-01 12:48:52 · 1910 阅读 · 1 评论 -
新手安装Ubuntu 16.04 操作系统
一、在windows操作系统下准备ubuntu系统的安装盘1. 下载ubuntu的ISO文件这一步相对简单,网络上面有很多的链接下载。这里贴一个ubuntu的官方网站链接,可以下载到ubuntu 16.04的iso文件https://wiki.ubuntu.com/XenialXerus/ReleaseNotes?_ga=2.66502190.1690246585.1511691893...原创 2017-11-26 18:48:42 · 340646 阅读 · 32 评论