※ 引述《Uniqueness (noman)》之銘言:
: 指標,c語言系列的門神
: 所有入門的人幾乎都會在指標卡住
: 餘下就是看自身資質看可以多久突破這個門神
: 但縱觀所有程式語言,只有c語言有指標的概念
: 所以我說,不會指標應該也沒什麼關係吧?
智慧是解決問題 大智慧是讓問題不存在
教你一招 讓你不要再面對奇怪的指針問題
詳見這網頁 有五本書可下載
https://software.intel.com/en-us/articles/intel-sdm
#include <stdio.h>
char format[] = "%s %s\n";
char hello[] = "Hello";
char world[] = "earth";
int main(int argc, char *argv[])
{
#ifdef _MSC_VER
__asm
{
mov eax, offset world
push eax
mov eax, offset hello
push eax
mov eax, offset format
push eax
call printf
}
#endif
#ifdef __GNUC__
asm(".intel_syntax noprefix");
asm("mov eax, offset world");
asm("mov eax, offset hello");
asm("push eax");
asm("mov eax, offset format");
asm("push eax");
asm("call printf");
#endif
}
學甚番邦胡語 直接面向處理器母語吧 擺除指針 就從內聯匯編開始