Skip to content

Multitasker-Liang

Note anything.

  • Home
  • File Management
  • Mail Management
  • Stream Live

LINUX系統程式設計-閱讀備忘

  • 0 comment
  • 2013 年 12 月 07 日
  • by
  • jwliang1226

READ MORE
  • Programming

發光風扇書架

  • 0 comment
  • 2013 年 12 月 04 日
  • by
  • jwliang1226

廢物利用,把不用的機殼改成書架,風扇由小3pin改為usb。

usb
發光
完成品

READ MORE
  • 閒聊

修改free函數從而增加嚴謹度

  • 0 comment
  • 2017 年 01 月 24 日
  • by
  • jwliang1226
 
#define safeFree(p) saferFree((void**)&(p)); 
void saferFree(void** p){ 
    if(p!=NULL && *p!=NULL){
        free(*p);
        *p=NULL;
    }   
}
} 
READ MORE
  • Programming

透視C語言指標-閱讀備忘

  • 0 comment
  • 2013 年 12 月 07 日
  • by
  • jwliang1226













P.11 NULL在C語言眾多head file中(stdio.h、stdlib.h、stddef.h)皆有下述定義:
#define NULL ((void*)0)

P.13 ASCII NUL無定義於C標頭檔之中,等同於’\0’。

P.14 當指標宣告為global變數或是static變數時,會在程式起始時初始化為NULL。

P.17 size_t等同於unsigned int。

p.27
const int *pci                //無法利用解參考更改值。
int * const pci               //無法更改pci位址。
const int * const pci   //上述兩者之結合。

P.38 釋放struct關鍵字建立的結構,如果結構包含了指向其他動態記憶體的指標,需要先釋放這些指標,否則可能Memory leak。

P.62 介紹stack frame置入方向,先置入參數,再置入回傳位址,之後才是區域變數,都依照宣告的相反順序置入。

P.76 介紹函數指標:
typedef int (*fptr)(int,int);
fptr fptrOperation; 等同於 int (*fptrOperation)(int,int);

Continue reading “透視C語言指標-閱讀備忘" →

READ MORE
  • Programming

近期文章

  • (Session) Cookie
  • makefile小記
  • Binary Hacks-閱讀備忘
  • 受保護的文章:隨手備忘note 超亂寫!
  • Vim plug-in && Color Setting

近期迴響

  • 蒂欧娜 在 (Session) Cookie
  • QQ496229907 在 (Session) Cookie
  • 1452956974 在 (Session) Cookie
  • 3085878268 在 (Session) Cookie
  • zengda 在 (Session) Cookie

彙整

  • 2014 年 十月
  • 2014 年 二月
  • 2014 年 一月
  • 2013 年 十二月
  • 2013 年 四月
  • 2013 年 一月
  • 2012 年 十二月

分類

  • Code
  • Javascript
  • Linux
  • Linux Driver
  • Programming
  • 備忘
  • 閒聊

友站鏈結

  • MoA的實況小站

其它

  • 登入
  • 文章 RSS 訂閱
  • 迴響 RSS 訂閱
  • WordPress 台灣正體中文

Couter

Calendar

十二月 2013
日 一 二 三 四 五 六
« 四月   一月 »
1234567
891011121314
15161718192021
22232425262728
293031  

分類

  • Code
  • Javascript
  • Linux
  • Linux Driver
  • Programming
  • 備忘
  • 閒聊

頁面

  • File Management
  • Mail Management
  • Stream Live

彙整

  • 2014 年 十月
  • 2014 年 二月
  • 2014 年 一月
  • 2013 年 十二月
  • 2013 年 四月
  • 2013 年 一月
  • 2012 年 十二月
© 2019Multitasker-Liang | Proudly powered by WordPress | Theme by Theme Farmer.