摘要: http://www.geeksforgeeks.org/when-do-we-pass-arguments-by-reference-or-pointer/In C++, variables are passed by reference due to following reasons:1)To... 阅读全文
posted @ 2015-09-22 18:31 lyleslie 阅读(112) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/g-fact-25/In C++,Reference variablesare safer than pointers because reference variables must be initialized and they cann... 阅读全文
posted @ 2015-09-22 18:24 lyleslie 阅读(181) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/references-in-c/When a variable is declared as reference, it becomes an alternative name for an existing variable. A vari... 阅读全文
posted @ 2015-09-22 17:02 lyleslie 阅读(168) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/g-fact-54/Every literal (constant) in C/C++ will have a type information associated with it.In both C and C++, numeric li... 阅读全文
posted @ 2015-09-22 16:55 lyleslie 阅读(102) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/write-c-program-produce-different-result-c/Write a program that compiles and runs both in C and C++, but produces differe... 阅读全文
posted @ 2015-09-22 16:43 lyleslie 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/g-fact-12-2/C allows a void* pointer to be assigned to any pointer type without a cast, whereas C++ does not; thisidiomap... 阅读全文
posted @ 2015-09-22 16:38 lyleslie 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.geeksforgeeks.org/extern-c-in-c/C++ supports function overloading, i.e., there can be more than one functions with same name and diffe... 阅读全文
posted @ 2015-09-22 16:18 lyleslie 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 内容摘自http://www.geeksforgeeks.org/write-c-program-wont-compiler-c/1)In C++, it is a compiler error to call a function before it is declared. But in C, ... 阅读全文
posted @ 2015-09-22 15:58 lyleslie 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 #include2 using namespace std;3 int main()4 {5 cout<<"hello world."<<endl;6 return 0;7 } 阅读全文
posted @ 2015-09-17 16:51 lyleslie 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 下文转自:http://www.cnblogs.com/archimedes/p/disjoint-set.html,感谢原作者。并查集(Disjoint Set) 在一些有N个元素的集合应用问题中,我们通常是在开始时让每个元素构成一个单元素的集合,然后按一定顺序将属于同一组的元素所在的集合合并,... 阅读全文
posted @ 2015-09-17 15:53 lyleslie 阅读(1033) 评论(0) 推荐(0) 编辑