<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[mingpingzhang的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/mingpingzhang</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; mingpingzhang]]></copyright><item><title><![CDATA[斐波那契数列]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/73276930</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/73276930</guid><author>mingpingzhang</author><pubDate>Thu, 15 Jun 2017 10:50:58 +0800</pubDate><description><![CDATA[int fun(int num)
{
    if (num == 1 || num == 2)
        return 1;
    return fun(num -1 ) + fun(num - 2);
}
int main()
{
    for(int i = 0; i < 5; ++i)
    {
        std::cout << fun(i) << std::endl;]]></description><category></category></item><item><title><![CDATA[华为面试]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/73276277</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/73276277</guid><author>mingpingzhang</author><pubDate>Thu, 15 Jun 2017 10:43:02 +0800</pubDate><description><![CDATA[今天去华为面试，面试官张口就问：“你对加班有什么意见？” 
我能有什么意见？我只是回答说：“给加班费就没有意见！” 
面试官又说：“我们除了星期六，星期天以外，加班都是义务的。但晚上加班到八点半以后有顿免费晚餐。” 
他妈的，这不是公然践踏《劳动法》么？为了维护法律的尊严，为了维护程序员的身体健康，我决定这个华为不去了。]]></description><category></category></item><item><title><![CDATA[欢迎使用优快云-markdown编辑器]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/73275221</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/73275221</guid><author>mingpingzhang</author><pubDate>Thu, 15 Jun 2017 10:16:30 +0800</pubDate><description><![CDATA[欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来，用它写博客，将会带来全新的体验哦：
Markdown和扩展Markdown简洁的语法
- 代码块高亮
LaTex数学公式
UML序列图和流程图
离线写博客
导入导出Markdown文件
丰富的快捷键
快捷键
加粗    Ctrl + B 
斜体    Ctrl + I 
引用    Ctrl + Q
插入链接]]></description><category></category></item><item><title><![CDATA[做程序架构设计时须着重考虑的几点]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38955701</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38955701</guid><author>mingpingzhang</author><pubDate>Sun, 31 Aug 2014 03:55:25 +0800</pubDate><description><![CDATA[做程序架构时须考虑以下四点:
1.分块：各业务模块之间应该尽量少的耦合
2.异步：不影响业务流程的尽量使用异步处理
3.记住失败：记录每一个异常，记录每一次请求的内容和返回的结果
4.自动化：用尽量少的配置完成更多的工作
weibo.com/p/1001603748188514347666
weibo.com/p/1001603748188539513858
weibo.com/p/]]></description><category></category></item><item><title><![CDATA[Libreoffice 是Openoffice的部分]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38955431</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38955431</guid><author>mingpingzhang</author><pubDate>Sun, 31 Aug 2014 03:39:33 +0800</pubDate><description><![CDATA[Libreoffice 是Openoffice的部分开发者，满足Openoffice的开发计划（由开源转变成闭源），在原Openoffic源代码基础上，二次开发而来。这是第二个稳定版的LibreOffice，包含部分安全方面的代码更新和翻译更新与3.3.2 Release Candidate 2版本并无太大区别]]></description><category></category></item><item><title><![CDATA[在程序运行过程中，对象所占的空间是不能随时释放的]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953767</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953767</guid><author>mingpingzhang</author><pubDate>Sun, 31 Aug 2014 02:09:04 +0800</pubDate><description><![CDATA[使用类名定义的对象（请查看：C++类的声明和对象的定义）都是静态的，在程序运行过程中，对象所占的空间是不能随时释放的。但有时人们希望在需要用到对象时才建立对象，在不需要用该对象时就撤销它，释放它所占的内存空间以供别的数据使用。这样可提高内存空间的利用率。

在C++中，可以使用new运算符动态地分配内存，用delete运算符释放这些内存空间（请查看：C++动态分配内存(new)和撤销内存(de]]></description><category></category></item><item><title><![CDATA[将一个结构体变量中的数据传递给另一个函数]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953383</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953383</guid><author>mingpingzhang</author><pubDate>Sun, 31 Aug 2014 01:53:44 +0800</pubDate><description><![CDATA[将一个结构体变量中的数据传递给另一个函数，有下列3种方法：

用结构体变量名作参数。一般较少用这种方法。用指向结构体变量的指针作实参，将结构体变量的地址传给形参。用结构体变量的引用变量作函数参数。

下面通过一个简单的例子来说明，并对它们进行比较。

【例7.5】有一个结构体变量stu，内含学生学号、姓名和3门课的成绩。要求在main函数中为各成员赋值，在另一函数print中将它们的值]]></description><category></category></item><item><title><![CDATA[C++ 动态分配内存的(new)之撤销内存的(delete)]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953339</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953339</guid><author>mingpingzhang</author><pubDate>Sun, 31 Aug 2014 01:50:59 +0800</pubDate><description><![CDATA[在软件开发过程中，常常需要动态地分配和撤销内存空间，例如对动态链表中结点的插入与删除。在C语言中是利用库函数malloc和free来分配和撤销内存空间的。C++提供了较简便而功能较强的运算符new和delete来取代malloc和free函数。

注意： new和delete是运算符，不是函数，因此执行效率高。

虽然为了与C语言兼容，C++仍保留malloc和free函数，但建议用户不用]]></description><category></category></item><item><title><![CDATA[C++ 声明新类型 typedef]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953195</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38953195</guid><author>mingpingzhang</author><pubDate>Sun, 31 Aug 2014 01:46:22 +0800</pubDate><description><![CDATA[在C++中，除了可以声明结构体、共用体、枚举等类型外，还可以用typedef声明一个新的类型名来代替已有的类型如：
    typedef int INTEGER;  //指定用标识符INTEGER代表int类型
    typedef float REAL;  //指定用REAL代表float类型
这样，以下两行等价：
    int i,j; float a,b;
    INTEG]]></description><category></category></item><item><title><![CDATA[How to Make cURL works with cmake]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/38794269</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/38794269</guid><author>mingpingzhang</author><pubDate>Sun, 24 Aug 2014 10:27:17 +0800</pubDate><description><![CDATA[How to Make cURL works with cmake

    Recently, I want to learn cURL, so downloaded it and compiled it, and use
cmake to manage the project, I wrote a CMakelists.txt as below:

cmake_minimum_req]]></description><category></category></item><item><title><![CDATA[the leak of the memory in c++ 03]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/26871375</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/26871375</guid><author>mingpingzhang</author><pubDate>Sat, 24 May 2014 21:52:36 +0800</pubDate><description><![CDATA[The Leak of the Memory in C++

    In this chaper I will introduce a new smart pointer which is scoped_ptr;
It likes auto_ptr but better. When peopel use auto_ptr, sometimes they forget
that auto_]]></description><category></category></item><item><title><![CDATA[The Leak of The Memory in C++ 1.2]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/24602671</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/24602671</guid><author>mingpingzhang</author><pubDate>Sun, 27 Apr 2014 22:02:15 +0800</pubDate><description><![CDATA[This articles will show how to avoid the leak of the memory in c++, I just use this articles to summerise something, and show how awesome my English is. If someone need Chinese version, just told me.]]></description><category></category></item><item><title><![CDATA[The Leak of The Memory In C++ 1.1]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/24390519</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/24390519</guid><author>mingpingzhang</author><pubDate>Thu, 24 Apr 2014 09:03:40 +0800</pubDate><description><![CDATA[The Leak of The Memory in C++ (chapter 1)

    So many people asked me something about the leak of the memory. They
said that in C++ you must be careful when use pointer. I must say they were
righ]]></description><category></category></item><item><title><![CDATA[Google C++ 编程规范 1.3]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/8189263</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/8189263</guid><author>mingpingzhang</author><pubDate>Fri, 16 Nov 2012 08:08:52 +0800</pubDate><description><![CDATA[Inline Functions
内联函数
▽Define functions inline only when they are small, say, 10 lines or less.
只有函数非常小，10行以内才定义为内联。

Definition:  You can declare functions in a way that allows the compiler to e]]></description><category></category></item><item><title><![CDATA[Google C++编程规范 1.2]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/8148471</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/8148471</guid><author>mingpingzhang</author><pubDate>Mon, 05 Nov 2012 13:20:42 +0800</pubDate><description><![CDATA[头文件依赖



当前向声明可满足使用的情况下不要使用#include



你包含一个头文件意味引入一个依赖，当头文件发生改变时，你的源代码文件必须重新编译。如果你的头文件包含其他头文件，其他的头文件发生任何一点改变，你源代码文件必须重新编译，因此我们应选择最小依赖，特别是头文件包含其他头文件时。



在你需要包含你自己定义的头文件时使用前向声明，你能减少一大堆头文件。]]></description><category></category></item><item><title><![CDATA[Google C++ 编程规范（1.1）]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/8147297</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/8147297</guid><author>mingpingzhang</author><pubDate>Mon, 05 Nov 2012 08:53:25 +0800</pubDate><description><![CDATA[第一章  头文件
第一节  #define保护




所有头文件都应有#define保护以防止多次包含。包含符号的格式应为： 项目>_路径>_文件>_H_。
为了保证符号的唯一性，符号应基于文件在项目文件树中位置，比如文件/src/bar/baz.h就应有如下头文件保护：
#ifndef FOO_BAR_BAZ_H_
#define FOO_BAR_BAZ_H_
...
#]]></description><category></category></item><item><title><![CDATA[为stl::string添加split函数]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/5449122</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/5449122</guid><author>mingpingzhang</author><pubDate>Sun, 04 Apr 2010 11:09:00 +0800</pubDate><description><![CDATA[将一个字符串依据一个字符或字符串将其分割为多个字符串是一个常用的字符串操作，但不知为什么STL并没有提供该项操作，于是只好自己动手，如下：  templatevector > inline split(const basic_string& source,              const basic_string& delimiter){	vector >]]></description><category></category></item><item><title><![CDATA[使用math.h中常用数学常数]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/541669</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/541669</guid><author>mingpingzhang</author><pubDate>Fri, 02 Dec 2005 00:13:00 +0800</pubDate><description><![CDATA[在微软提供的math.h文件中定义了很多数学常数，如 M_E,M_PI等，但如果只是使用#include 是无法使用这些常数的，必须在#include 之前加上一句 #define _USE_MATH_DEFINES。因为这些常数不是C/C++标准的一部分。]]></description><category></category></item><item><title><![CDATA[改变STATIC文本颜色]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/422798</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/422798</guid><author>mingpingzhang</author><pubDate>Tue, 12 Jul 2005 22:40:00 +0800</pubDate><description><![CDATA[case WM_CTLCOLORSTATIC:  if(GetDlgItem(hwnd,IDC_STATIC_EMAIL) ==(HWND)lParam)  {   SetTextColor((HDC)wParam,0xff0000);   SetBkMode((HDC)wParam,TRANSPARENT);   return (BOOL)CreateSolidBrush(GetSysColor]]></description><category></category></item><item><title><![CDATA[微软vs2003 vc.net头文件的一个bug]]></title><link>https://blog.youkuaiyun.com/mingpingzhang/article/details/422683</link><guid>https://blog.youkuaiyun.com/mingpingzhang/article/details/422683</guid><author>mingpingzhang</author><pubDate>Tue, 12 Jul 2005 18:01:00 +0800</pubDate><description><![CDATA[根据MSDN在commctrl.h应该有如下定义typedef struct tagNMLVDISPINFO {    NMHDR hdr;    LVITEM item;} NMLVDISPINFO, *LPNMLVDISPINFO但我在使用LPNMLVDISPINFO时却出错，打开commctrl.h文件一看，发现根本就没有LPNMLVDISINFO的定义，只有NMLVDISPINFO的定义，]]></description><category></category></item></channel></rss>