※ 引述《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
}
学甚番邦胡语 直接面向处理器母语吧 摆除指针 就从内联汇编开始