算法开章

10年前学习算法,到现在也没有做出一个五子棋的程序!

无他,没练!

前阵子联系以前的同时,已经完全转入了Linux开发,做视频监视,驱动及应用都自己开发,应该收获不小吧。我这半年做的网络应用,收获也丰富,但是对代码的眷恋还是没有消减。

厚积薄发,这个地方就作为数据结构与算法的学习备忘吧。

首先,需要准备下Debian Linux开发环境

对于学习,只要按章180M的网络版ISO就可以了,其他的一些软件后续添加吧。
☆★配置网络:
1、查看当前的网络配置 ifconfig -a
2、修改IP地址:修改文件 /etc/network/interfaces 和 /etc/resolv.conf, 然后执行 /etc/init.d/networking restart

2.1静态IP地址interfaces
auto lo eth0
iface lo inet loopback

iface eth0 inet static
address 192.168.18.88
netmask 255.255.255.0
broadcast 192.168.18.255
gateway 192.168.18.1
2.2动态IP地址interfaces
auto eth0
iface eth0 inet dhcp
3、设置DNS resolv.conf
domain
nameserver 192.168.18.1
nameserver 192.168.0.120
4、安装apt-spy:apt-get install apt-spy; apt-spy update; apt-spy -d main
SERVER: debian.yorku.ca
Benchmarking HTTP...
                Downloaded 3844146 bytes in 15.72 seconds
                Download speed: 238.82 kB/sec
可以在 etc/apt/sources.list 里面加入:
         deb http://debian.yorku.ca/debian testing main non-free contrib

apt-get update
5、vim ~/.bashrc ,修改 alias ls='ls --color "
        vim语法加亮:apt-get install vim-full
        vim
/etc/vim/vimrc     ;加入 syn on, filetype on 命令。


6、为方便通过putty链接我们的Linux主机,安装ssh是必须的此时可以用putty连接主机
    apt-get install ssh

    考虑到网络安全,下载nmap扫描网络
    apt-get install nmap
    nmap -O -P0 192.168.18.1

7、aptitude search gcc 查看可用的gcc版本,并安装gcc,C++的编译器为cpp,可用apt-get install build-essential安装。

 有关gcc的编译链接实验,柯参考链接

在Visual Studio里面的测试程序如下:
 #include "stdafx.h"

#include <cstdlib>      //system("pause");
#include <Windows.h>    //MessageBox

int _tmain(int argc, _TCHAR* argv[])
{
    MessageBox(nullptr,TEXT("This is a Win32 Application Demo!"),TEXT("Running Demo"),MB_OK);
    system("pause");
    return 0;
}
原文地址:https://www.cnblogs.com/flaaash/p/1322109.html