2015年3月12日 星期四

Modern C++ in embedded systems Part 1 : Myth and Reality


Modern C++ in embedded systems Part 1 : Myth and Reality
by 

References
A reference in C++ is physically identical to a pointer. Only the syntax is different. References are safer than pointers because they can’t be null, they can’t be uninitialized, and they can’t be changed to point to something else. The closest thing to a reference in C is a const pointer. Note that this is not a pointer to a const value, but a pointer that can’t be modified. Listing 3 shows a C++ code fragment with a reference. 

     // C++ reference example
     void accumulate(int& i, int j) {
         i += j;
     }


Listing 3: C++ reference


2015年3月7日 星期六

[NTFS, Win7] Symbolic link














mklink:Creates a symbolic link.
適用平台:Windows Server 2008, Windows Vista、Windows 7 等以上版本

Syntax:

mklink [[/d] | [/h] | [/j]]

Parameters:

ParameterDescription
/dCreates a directory symbolic link. By default, mklink creates a file symbolic link.
/hCreates a hard link instead of a symbolic link.
/jCreates a Directory Junction.
Specifies the name of the symbolic link that is being created.
Specifies the path (relative or absolute) that the new symbolic link refers to.
/?Displays help at the command prompt.

Examples:
mklink /d C:\Users\eric_c_huang\Desktop\AAA C:\Document\ABC
在桌面上建立名為 AAA 的 symbolic link ,連結至 C:\Document  的 ABC 目錄…

建立 symbolic link 需要管理者權限,否則會出現「you do not have sufficient privilege to perform this operation」的錯誤訊息

2012年5月23日 星期三

How to find variants of "%f" ?

In UltraEdit, how to find C-language printf format specifier %f variants ?

such as
sprintf(str,"FPS=%2.2f",fps);
printf("%f\n",fps);
... and so on.

Mofi@Vienna :
With UltraEdit regular expression engine run a Find with Match Case enabled with search string
^%[0-9.]++f
 

2012年1月16日 星期一

[XP] 關閉"最近的文件"(Recent)

1. 開始 > 執行 > GPEDIT.MSC
2. 使用者設定 > 系統管理範本 >「開始」功能表和工作列
3. 「不保留最近開啟文件的記錄」此選項的值改成「已啟用」> 確定
4. 重開機

WinHEX launch takes too long time.

Possible solutions (or):
1. Close anti-virus daemons.
2. Delete files created after this situation occurs in WinHEX folder.
3. Delete files inside C:\Documents and Settings\user\ associated to WinHEX.

2011年1月14日 星期五

天天都是紀念日

06.18 訂婚
06.25 結婚
10.16 MmM
10.18 進入職場

2009年6月8日 星期一

Life is never completed till its end

Who says that? I do, after a tiresome project review meeting.