随笔分类 -  C++

摘要:32位编译器: char :1个字节 char*(即指针变量): 4个字节(32位的寻址空间是2^32) short int : 2个字节 int: 4个字节 unsigned int : 4个字节 float: 4个字节 double: 8个字节 long: 4个字节 long long: 8个字 阅读全文
posted @ 2020-05-09 16:58 风狼啸天 阅读(394) 评论(0) 推荐(0)
摘要:很多时候习惯了使用switch....case ,,,但是一旦case过多,函数体就显得过于大。。。。。 处理方法: 根据case类型、及本来使用switch...case这个函数的参数构建的一个公用函数指针组成结构体 typedef void (类名::*PTEMP_FUN)(type1 type 阅读全文
posted @ 2016-06-03 17:59 风狼啸天 阅读(995) 评论(0) 推荐(0)
摘要:转自:http://www.cnblogs.com/ComputerG/archive/2012/02/01/2334898.html 一:C语言中的内存机制 在C语言中,内存主要分为如下5个存储区: (1)栈(Stack):位于函数内的局部变量(包括函数实参),由编译器负责分配释放,函数结束,栈变 阅读全文
posted @ 2016-03-15 18:08 风狼啸天 阅读(168) 评论(0) 推荐(0)