上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 102 下一页
摘要: 本质:将成员函数与对象数据进行剥离。 从编程语言的角度看,面向对象是将数据和对数据的操作进行了绑定; 调用对象成员函数,本质是对对象的数据进行操作;对象作为缺省参数传进成员函数,从而完成操作。 从面向对象转化成面向结构编程,需要对成员函数和对象数据进行解绑; 将对象以显式参量的形式传进转换后的函数, 阅读全文
posted @ 2018-01-19 15:40 zzfx 阅读(600) 评论(0) 推荐(0)
摘要: 调用约定: __cdecl __fastcall与 __stdcall,三者都是调用约定(Calling convention),它决定以下内容:1)函数参数的压栈顺序,2)由调用者还是被调用者把参数弹出栈,3)以及产生函数修饰名的方法。 1、__stdcall调用约定:函数的参数自右向左通过栈传递 阅读全文
posted @ 2018-01-19 15:26 zzfx 阅读(488) 评论(0) 推荐(0)
摘要: 函数调用约定描述了如何以正确的方式调用某些特定类型的函数。包括了函数参数在栈上的分配顺序、有哪些参数将通过寄存器传入,以及在函数返回时函数栈的回收方式等。 函数调用约定的几种类型 stdcall,cdecl,fastcall,thiscall,nakedcall,pascal stdcall调用约定 阅读全文
posted @ 2018-01-19 15:23 zzfx 阅读(1163) 评论(0) 推荐(0)
摘要: 关于 C/C++ 函数调用约定,大多数时候并不会影响程序逻辑,但遇到跨语言编程时,了解一下还是有好处的。 VC 中默认调用是 __cdecl 方式,Windows API 使用 __stdcall 调用方式,在 DLL 导出函数中,为了跟 Windows API保持一致,建议使用 __stdcall 阅读全文
posted @ 2018-01-19 15:20 zzfx 阅读(349) 评论(0) 推荐(0)
摘要: Grand Central Dispatch (GCD) is a technology developed by Apple Inc. to optimize application support for systems with multi-core processors and other  阅读全文
posted @ 2018-01-18 23:51 zzfx 阅读(216) 评论(0) 推荐(0)
摘要: POSIX Threads, usually referred to as pthreads, is an execution model that exists independently from a language, as well as a parallel execution model 阅读全文
posted @ 2018-01-18 23:49 zzfx 阅读(205) 评论(0) 推荐(0)
摘要: In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user acti 阅读全文
posted @ 2018-01-18 23:47 zzfx 阅读(375) 评论(0) 推荐(0)
摘要: 操作方式、含义、存储方式。 In computer science and computer programming, a data type or simply type is a classification of data which tells the compiler or interpr 阅读全文
posted @ 2018-01-18 21:58 zzfx 阅读(918) 评论(0) 推荐(0)
摘要: 以前本站发布过《编程语言时间地理图》、《计算机编程简史图》,下面是两张关于编程语言的进化图。 第一张是比较宏观的,来源在这里,虽然是去年的,但还是比较不错的,其把计算机编程语言分成了五个时代—— 语言诞生。1940年代。第一个语言应该是:Ada Lovelace, 编译器时代。1950年代。这个时代 阅读全文
posted @ 2018-01-18 17:04 zzfx 阅读(328) 评论(0) 推荐(0)
摘要: Type system[edit] Main articles: Data type, Type system, and Type safety A type system defines how a programming language classifies values and expres 阅读全文
posted @ 2018-01-18 15:54 zzfx 阅读(322) 评论(0) 推荐(0)
摘要: In computer programming, run-time type information or run-time type identification (RTTI)[1] refers to a C++ mechanism that exposes information about 阅读全文
posted @ 2018-01-18 15:46 zzfx 阅读(373) 评论(0) 推荐(0)
摘要: 类型系统的属性: 1、结构属性; 2、规则属性;类型系统定义了一套规则(内部数据的访问规则、函数的访问规则、类型的比较与转化规则),以供编译和运行时进行检查。 In programming languages, a type system is a set of rules that assigns 阅读全文
posted @ 2018-01-18 15:38 zzfx 阅读(275) 评论(0) 推荐(0)
摘要: 动态改变运行时结构 Dynamic programming language, in computer science, is a class of high-level programming languages which, at runtime, execute many common pro 阅读全文
posted @ 2018-01-18 15:12 zzfx 阅读(266) 评论(0) 推荐(0)
摘要: 动态语言:修改结构; 动态类型:运行时类型检查; 编译语言:机器码、解释器; 强类型:类型不可变。 编译型语言和解释型语言 1、编译型语言 需通过编译器(compiler)将源代码编译成机器码,之后才能执行的语言。一般需经过编译(compile)、链接(linker)这两个步骤。编译是把源代码编译成 阅读全文
posted @ 2018-01-18 15:06 zzfx 阅读(626) 评论(0) 推荐(0)
摘要: this 和 self指针 为函数提供了运行上下问;为函数提供了当前对象的其实地址,方便函数的对对象的访问。 阅读全文
posted @ 2018-01-18 12:49 zzfx 阅读(121) 评论(0) 推荐(0)
摘要: Normally, in a typed language, the dispatch mechanism will be performed based on the type of the arguments (most commonly based on the type of the rec 阅读全文
posted @ 2018-01-18 12:40 zzfx 阅读(315) 评论(0) 推荐(0)
摘要: Late binding, or dynamic binding,[1] is a computer programming mechanism in which the method being called upon an object or the function being called 阅读全文
posted @ 2018-01-18 12:38 zzfx 阅读(169) 评论(0) 推荐(0)
摘要: C++中的虚函数(Virtual Function)是用来实现动态多态性的,指的是当基类指针指向其派生类实例时,可以用基类指针调用派生类中的成员函数。如果基类指针指向不同的派生类,则它调用同一个函数就可以实现不同的逻辑,这种机制可以让基类指针有“多种形态”,它的实现依赖于虚函数表。虚函数表(Virt 阅读全文
posted @ 2018-01-17 22:03 zzfx 阅读(402) 评论(0) 推荐(0)
摘要: 绑定:建立联系; 分发:作出选择。 https://en.wikipedia.org/wiki/Dynamic_dispatch https://en.wikipedia.org/wiki/Late_binding Dynamic dispatch is different from late bi 阅读全文
posted @ 2018-01-17 21:43 zzfx 阅读(199) 评论(0) 推荐(0)
摘要: 对象指针本身也是接口中的一个参量。 然而,在更广阔的计算机领域中,多态这个词并不只是局限在类继承和虚函数上。只要是同名函数能够根据参数的类型不同而获得不同的实现,我们都可以叫它“多态”。 多态可以分成三类,Ad hoc 多态(Ad hoc ~),参数化多态(Parametric ~),子类型多态(S 阅读全文
posted @ 2018-01-17 16:53 zzfx 阅读(202) 评论(0) 推荐(1)
上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 102 下一页