03 2009 档案
(转)C++中extern “C”含义深层探索
摘要:转)C++中extern “C”含义深层探索 1.引言 C++语言的创建初衷是“a better C”,但是这并不意味着C++中类似C语言的全局变量和函数所采用的编译和连接方式与C语言完全相同。作为一种欲与C兼容的语言,C++保留了一部分过程式语言的特点(被世人称为“不彻底地面向对象”),因而它可以定义不属于任何类的全局变量和函数。但是,C++毕竟是一种面向对象的程序设计语言,为了支持...
阅读全文
排序二叉树~
摘要:呵呵 原来打印语句位置的不同就是不同的访问方式~ // btree.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdlib.h" int a[10]={1,2,4,5,3,6,7,8,9,10}; struct tree { tree *left; ...
阅读全文
c 哈夫曼~
摘要:发现写哈夫曼还是比较好玩 献丑了 :就是每次取2个最小的值算成一个新的节点直到最后一个节点 // hfm.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdlib.h" int a[10]; struct node { int value; int lef...
阅读全文