转载自:http://www.slyar.com/blog/complicated-point-type.html int p; p是一个普通的整型变量. int *p; 1.p与*结合,说明p是一个指针.2.*p与int结合,说明指针所指向的内容的类型是整型的. 所以p是一个返回整型数据的指针. int p[5]; 1.p与[]结合,说明p是一个数组.2.p[5]与int结合,说明数组里的元素是整型的. 所以p是一个由整型数据组成的数组. int *p[5]; 1.p与[]结合(因为其优先级比…
初始化: std::pair<int, float> p; //initialize p.first and p.second with zero std::pair<int, const char*> p(42, "hello"); make_pair(42, "hello"); // no need for the var name, it's returned by make_pair make_pair<int, float&g…
FindBugs分析记录 Bad Practice: Class defines a clone() method but the class doesn't implement Cloneable. Dodgy Code: Confidence: HIGH Potentially dangerous use of non-short-circuit logic. Redundant nullcheck of o,which is known to be non-null.…