随笔分类 -  C/C++ Study Notes

Re-Learn C(The C Programming Language.2Nd)
摘要:Chapter 1 - A Tutorial Introductionprintf is not part of the C language; there is no input or output defined in C itself. printf is just a useful function from the standard library of functions that are normally accessible to C programs. The behaviour of printf is defined in the ANSI standard, howev 阅读全文

posted @ 2013-05-21 17:36 wacao 阅读(372) 评论(0) 推荐(0)

C声明阅读
摘要:C Right-Left Rule (Rick Ord's CSE 30 - UC San Diego)The "right-left" rule is a completely regular rule for deciphering Cdeclarations. It can also be useful in creating them.Right-left rule's defination : Start reading the declaration from the innermost parentheses, go right, and th 阅读全文

posted @ 2013-05-03 18:03 wacao 阅读(393) 评论(0) 推荐(0)

程序设计范型
摘要:要支持一种范型,不仅在于某些能直接用于该种范型的显见形式的语言功能,还在于一些形式上更加细微的,对无意中偏离了这种范型的情况做编译时或者运行时的检查。类型检查是这类检查中的最明显例子。程序设计范型发展:1.过程式程序设计原始的程序设计范型是:确定你需要哪些过程,采用你能找到的最好的算法。double sqrt(double arg){ //计算平方根的代码 }void fun(){ double root = sqrt(2); // }附:C++中,一个char变量具有某种自然的大小,正好能保存给定机器里的一个字符(通常是一个字节),int变量正好适合给定机器里的整数运算。C++能... 阅读全文

posted @ 2012-12-10 23:53 wacao 阅读(304) 评论(0) 推荐(0)

导航