原创 c++ shell

Last year, I wrote a shell for unix using C++, so I thought I'd post the source code incase anyone can

原创 linux編程筆記 關於信號

#include #include #include #include void ouch(int sig) { printf("OUCH! I got signal %d/n", sig);

原创 string AND char* 轉載

(一) 概述string和CString均是字符串模板類,string爲標準模板類(STL)定義的字符串類,已經納入C++標準之中;CString(typedef CStringT<TCHAR, StrTraitMFC<TCHAR>> C

原创 VIM 的一些補充 轉載......

VIM 輸入模式要如何輸入資料呢?有好幾個指令可以進入輸入模式:新增 (append)a 從光標所在位置後面開始新增資料,光標後的資料隨新增資料向後移動。A 從光標所在列最後面的地方開始新增資料。 插入 (

原创 c/c++ splitting string class

/* file: test.cpp test file for this class*/#include <stdio.h>#include "functions.hpp"int main(){ Functions* spliting =

原创 linux 使用信號和掛起進程

#include #include #include #include #include static int alarm_fired = 0; void ding(int sig) { a

原创 輕輕鬆鬆產生 Makefile

輕輕鬆鬆產生 Makefile     在 Unix 上寫程序的人大概都碰過 Makefile,尤其是用 C 來開發程序的        人。用 make 來開發和編譯程序的確很方便,可是要寫出一個 Makefile        就不簡

原创 關於內聯函數讀書筆記

以前對內聯不甚了了,只是簡單的使用,或者壓根就沒想到要用今天看了看錢能的<<C++大學教程>>內聯函數的解釋,感覺無非就是將INLINE處的代碼展開而替代了函數調用而已,不用函數調用,不用新創建爲此函數的棧空間,而省了調用函數產生的空間和

原创 用 GDB 調試程序

用 GDB 調試程序 原著:Rick McMullin用 gdb 調試 GCC 程序    Linux 包含了一個叫 gdb 的 GNU 調試程序. gdb 是一個用來調試 C 和 C++ 程序的強力調試器. 它使你能在程序運行時觀察程序

原创 GAWK 手冊 轉載

GAWK 手冊作者:Wilbur Lang第一章 前言第二章 簡介 第三章 讀取輸入檔案 第四章 印出 第五章 Patterns 第六章 算式(Expression)作爲Actions的敘述 第七章 Actions裏面的控制敘述 第八章