<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Fq_Sl的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Fq_Sl</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Fq_Sl]]></copyright><item><title><![CDATA[Lua 的问题]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/90726814</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/90726814</guid><author>Fq_Sl</author><pubDate>Sat, 01 Jun 2019 12:12:31 +0800</pubDate><description><![CDATA[Lua 的点号和冒号会造成很多的问题，浪费程序员的脑力。在编程时我总是要花时间去看相应代码用的是点号还是冒号，不然参数就会出问题。像C++的代码，虽然也会默认有一个this指针，但这种传递总是发生，反而不容易出问题。

 Lua 的for in do end循环逻辑很不通畅，虽然从代码上来看并不多。



 可以看到值_var首先用factory 生成——此时...]]></description><category></category></item><item><title><![CDATA[处理开始菜单搜索无效的方法]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/89714926</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/89714926</guid><author>Fq_Sl</author><pubDate>Tue, 30 Apr 2019 19:37:10 +0800</pubDate><description><![CDATA[处理开始菜单搜索无效的方法，win + x， 打开powershell（管理员），输入以下命令：

Get-AppXPackage -Name Microsoft.Windows.Cortana | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}...]]></description><category></category></item><item><title><![CDATA[生成静态库及动态库]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/89570523</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/89570523</guid><author>Fq_Sl</author><pubDate>Fri, 26 Apr 2019 17:53:35 +0800</pubDate><description><![CDATA[简单的库（静态/动态）生成



 有hello.h、hello.cpp和test.cpp三个文件。




			hello.h

			

			#ifndef _TEST_HELLO_H_

			#define _TEST_HELLO_H_

			

			

			void hello();

			

			

			#endif
			
		


			...]]></description><category></category></item><item><title><![CDATA[Cpp Experiment -- sizeof and array]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81978437</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81978437</guid><author>Fq_Sl</author><pubDate>Thu, 23 Aug 2018 12:04:40 +0800</pubDate><description><![CDATA[    这是很多公司面试的时候会问的问题——当然，在你加入某家公司后，你可能会发现这些东西一点也用不上。因为进去后一般是天天写业务逻辑。

    不过最近写一个功能时涉及到这个东西，就做了个测试，把结果记下来，下面是代码：


#include &amp;lt;iostream&amp;gt;

using namespace std;

void getSize(char *a) 
{
    cout &amp;l...]]></description><category></category></item><item><title><![CDATA[Cpp Experiment -- try catch]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81835528</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81835528</guid><author>Fq_Sl</author><pubDate>Sun, 19 Aug 2018 10:45:50 +0800</pubDate><description><![CDATA[    如果没有try-catch语句，我们的函数可能只能靠返回负数之类的方式来表示出错，但这不是可以依靠的方法，因为很多函数的调用者根本不在意函数的返回值，没有强制的约束让调用者去处理函数发生的错误，而try-catch配上throw的方式则不同，如果用户不处理这些错误， 那么程序可能会死掉。下面就来测试一下C++中的try-catch语句。

    首先，try-catch语句是不止可以返回...]]></description><category></category></item><item><title><![CDATA[Cpp 使用宏输出变量名——鸡肋]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81663619</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81663619</guid><author>Fq_Sl</author><pubDate>Tue, 14 Aug 2018 11:21:39 +0800</pubDate><description><![CDATA[    当时刚找到这个用法， 我高兴了好一阵，但后来发现，它并没有我想象中有用。这只是一个障眼法罢了，并没有看上去那么有用。


#include&amp;lt;string&amp;gt;
#include&amp;lt;iostream&amp;gt;

using std::string;
using std::cout;
using std::endl;

#define _VNAME(value) (#value)

...]]></description><category></category></item><item><title><![CDATA[Cpp Experiment -- 在main函数中默认初始化字符数组]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81663336</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81663336</guid><author>Fq_Sl</author><pubDate>Tue, 14 Aug 2018 11:11:05 +0800</pubDate><description><![CDATA[    在main函数中初始化字符数组，字符数组中的值全是'\0'么。 下面是测试代码：


#include &amp;lt;iostream&amp;gt;

using namespace std;

void check(const char name, const char *arr, const int size)
{
    for (int i = 0; i &amp;lt; size; i++)
   ...]]></description><category></category></item><item><title><![CDATA[Cpp Experiment -- 作用域问题]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81662273</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81662273</guid><author>Fq_Sl</author><pubDate>Tue, 14 Aug 2018 10:31:16 +0800</pubDate><description><![CDATA[    在while 或 for 循环中声明的局部变量是无法在外部访问的。


// 测试代码
int main()
{
    for (int i = 0;;)
    {   
        break;
    }   
    if (i) 
    return 0;
}

     结果：编译报错：



 

    同样，在if语句中声明的变量，也无法在外部访问。有时候，我们会...]]></description><category></category></item><item><title><![CDATA[C++设计缺陷 ：  cin/cout  wcin/wcout]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81259059</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81259059</guid><author>Fq_Sl</author><pubDate>Sat, 28 Jul 2018 12:04:50 +0800</pubDate><description><![CDATA[    首先声明，我热爱C++，因为我喜欢它强大的功能，别的语言有的它几乎都有。对于模板地各种使用更是让我觉得打开了新世界的大门。

    然而它并不完美，甚至很多方面让人崩溃。我会把使用中的遇到的问题记录在这篇文章中。

 
    绝大多数学C++的人第一堂课都会用到cin 和cout，但你永远想不到，当cin、cout与win、wcout一起用时会有多让人难过。也许是我造诣不够。我尝试使用...]]></description><category></category></item><item><title><![CDATA[C++ 用模板实现List的Node基类]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81232092</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81232092</guid><author>Fq_Sl</author><pubDate>Fri, 27 Jul 2018 10:07:53 +0800</pubDate><description><![CDATA[    看了C++的单例模式后，启发很大，刚好要写一个List，就在想能不能用模板来实现List的Node节点。

    在这里直接上重点，完成后的代码：


#ifndef DONZ_TEMPLATE_NODE_H
#define DONZ_TEMPLATE_NODE_H


template&amp;lt;typename SubNode&amp;gt;
class Node
{
public:
    N...]]></description><category></category></item><item><title><![CDATA[Cpp Experiment -- 当进程被销毁时，不会调用进程中对象的析构函数]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81143204</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81143204</guid><author>Fq_Sl</author><pubDate>Sat, 21 Jul 2018 12:11:06 +0800</pubDate><description><![CDATA[    我们知道，当一个进程被销毁时，分配给它的资源会被回收，包括泄漏的内存，实际上，重启进程是解决内存泄漏的一个应急方法。

    但是，杀死进程时， 会调用被杀死的进程创建的对象的析构函数吗？

    实验代码如下：


#include&amp;lt;iostream&amp;gt;

class Test{
public:
    ~Test()
    {   
        std::cout ...]]></description><category></category></item><item><title><![CDATA[用C++调用Lua函数--详解]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81136019</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81136019</guid><author>Fq_Sl</author><pubDate>Fri, 20 Jul 2018 17:37:37 +0800</pubDate><description><![CDATA[    首先你要安装lua的dev，安装很简单：

    yum install lua-devel

即可，很多Linux系统自带Lua但是没有dev，有点小坑。

    下面是Lua文件，里面就两个函数：


function add(a, b)
    return a + b 
end

function hello()
    print(&quot;Hello Lua!!!&quot;)
end

 ...]]></description><category></category></item><item><title><![CDATA[Linux最小化安装后纯手动安装gcc-8 -- 详解]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81131825</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81131825</guid><author>Fq_Sl</author><pubDate>Fri, 20 Jul 2018 15:43:10 +0800</pubDate><description><![CDATA[    我虚拟机上安装的是CentOS7系统，选的是最小化安装，网络适配器是NAT而不是桥接模式。

心法总诀

    他强任他强，轻风抚山岗。

    总的来说，逢山开路，遇水搭桥，关键不放弃，本人第一次搭也遇到很多错误， 解决方法就是把错误信息百度一下。

    本文把大部分可能会出问题的地方指出来了，如果有遗漏，可按上述方法解决，毕竟我搭好了，你肯定也可以。

第一难  连上网络

 ...]]></description><category></category></item><item><title><![CDATA[Vim Trick -- Quit]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81053346</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81053346</guid><author>Fq_Sl</author><pubDate>Sun, 15 Jul 2018 15:23:05 +0800</pubDate><description><![CDATA[    How to quit vim safely?

    :wq

    Save and quit. If you create a new file and write none , use the command, the new file will not disappear and will be save with no word.

 

    ZZ

    Save ...]]></description><category></category></item><item><title><![CDATA[Linux Study -- Tour directory in Linux]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81051601</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81051601</guid><author>Fq_Sl</author><pubDate>Sun, 15 Jul 2018 11:52:35 +0800</pubDate><description><![CDATA[Understanding the Filesystem Tree    AUnix-like operation system such as Linux organizes its files in what is calleda hierarchical directory structure.This means that they are organized in a tree-like...]]></description><category></category></item><item><title><![CDATA[Linux Study --SHELL PROMPT]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81051029</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81051029</guid><author>Fq_Sl</author><pubDate>Sun, 15 Jul 2018 11:09:05 +0800</pubDate><description><![CDATA[    Once we launch a terminal emulator or start a Linux char interface,we will see something like this:        This is called a shell prompt,and it appears whenever the  shell is ready to accept input...]]></description><category></category></item><item><title><![CDATA[Note:Programming in Lua - Chapter 3 : Experience]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81042405</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81042405</guid><author>Fq_Sl</author><pubDate>Sat, 14 Jul 2018 15:45:26 +0800</pubDate><description><![CDATA[       区别，表达式中可包含函数定义和table构造式。        算术操作符       区别，提供^操作符作为指数操作符，x^2表示x的平方。       lua中的%，如有 a%b，得到的结果的符号总是与b相同。如-3%2得1。        关系操作符       区别：~= 是 != 。关于==与~=，类型不同直接不同，类型相同再基于类型比较，nil只与nil相同。      ...]]></description><category></category></item><item><title><![CDATA[Study Lua : 像使用执行文件一样使用Lua文件]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81043633</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81043633</guid><author>Fq_Sl</author><pubDate>Sat, 14 Jul 2018 15:01:50 +0800</pubDate><description><![CDATA[    在《Programming in Lua》一书中有对这种操作的描述：    但如果我们直接按这种方法做，可能不会成功。因为我们Lua程序的位置和书上的可能不太一样。    如何得到我们系统中Lua可执行文件的位置呢？ 我们可以使用which命令，如下：    然后我们可以这样编写我们的文件：#!/usr/bin/luaprint(&quot;hello world! hello script!&quot;) ...]]></description><category></category></item><item><title><![CDATA[Note:Programming in Lua - Chapter 2 :Type and Value]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/81042312</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/81042312</guid><author>Fq_Sl</author><pubDate>Sat, 14 Jul 2018 12:05:27 +0800</pubDate><description><![CDATA[Base       lua，动态类型语言。lua有8种基础类型：nil/boolean/number（实数）/string/userdata（自定义类型）/function/thread（线程）/table（表）。       可用type函数得到一个值的类型，type的返回值是一个string。        lua中变量没有预定义的类型，任何变量可包含任何类型的值。注意函数也是一种值：   ...]]></description><category></category></item><item><title><![CDATA[来自C++的终级老单例]]></title><link>https://blog.youkuaiyun.com/Fq_Sl/article/details/80888921</link><guid>https://blog.youkuaiyun.com/Fq_Sl/article/details/80888921</guid><author>Fq_Sl</author><pubDate>Mon, 02 Jul 2018 19:43:15 +0800</pubDate><description><![CDATA[    一个可继承的单例模式。

这是可被继承的基类

 




template&amp;lt;typename T&amp;gt;
class Singleton
{
public:
    Singleton(const Singleton&amp;amp;) = delete;
    virtual ~Singleton(){}
    Singleton &amp;amp;operator=(const Singl...]]></description><category></category></item></channel></rss>