
ASM/C/C++编程技巧与误区
文章平均质量分 69
头像是我的偶像
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Managing Dynamic Memory Is Error-prone
There are three common programs with using and delete to manage dynamic原创 2015-01-15 16:20:42 · 545 阅读 · 0 评论 -
AT&T Assembly Language Note
1. Some Tools Unlike a high-level language environment in which you can purchase a complete development environment, you often have to piece together an assembly language development environment. At原创 2015-06-28 14:54:22 · 754 阅读 · 0 评论 -
AT&T Assembly Language Samples
1. Simple Samples 1.1 cpuid.s #cpuid.s Sample program to extract the processor Vendor ID # - cpuid instruction code is used to gather information about the process, # depending on the value of th原创 2015-07-07 13:44:04 · 778 阅读 · 0 评论 -
c++_primer_exercise_1619_1620
/*********************************************** * IDE: VS2010 * FILE: print_container.h ***********************************************/ #ifndef PRINT_CONTAINER_H #define PRINT_CONTAINER_H原创 2015-02-25 16:20:27 · 422 阅读 · 0 评论 -
pick up
1. When we use a smart pointer, the smart pointer class ensures that memory is freed when it is no longer needed even if the block is exited prematurely due to an exception. In contrast, memory that w原创 2015-01-16 00:23:08 · 411 阅读 · 0 评论 -
default constructor, copy constructor, copy assignment operator, destructor
constructor: a special member function used to initialize objects. Each constructor should give each data member a well defined initial value. synthesized default constructor: the default constru原创 2015-01-20 10:13:40 · 587 阅读 · 0 评论 -
C++PrimerThinking
1.The fact that the copy constructor is used to initialize nonreference parameters of class type explains why the copy constructor’s own parameter must be a reference. If that parameter were not a ref原创 2015-01-19 10:07:11 · 370 阅读 · 0 评论 -
Conventions
There are a number of generally accepted conventions for naming variables. Following these conventions can improve the readability of a program. An identifier should give some indication of its m原创 2015-01-15 16:05:04 · 502 阅读 · 0 评论 -
Name Lookup and Inheritance
Understanding how function calls are resolved is crucial to understanding inheritance in C++. Given the call p->mem()(or obj.mem()), the following fours steps happen: First determine the static原创 2015-02-05 10:01:45 · 416 阅读 · 0 评论 -
看看编译器是怎样用乘法代替除法的
在0与1的计算机世界中,最复杂的运算就是除法了。复杂到什么程度呢?就是不到万不得已的情况下,连编译器自己都不愿意产生除法指令。 备注:以下分析,主要针对的情况为 除数不是2的指数。如果除法是2的指数,尽可以简单地使用移位来运算。比如, 20 / 4 = 20 >> 2 = 5(2 ^ '2' = 4)。原创 2015-07-21 19:20:57 · 3810 阅读 · 0 评论