原创 What values do the I/O operators (>) return?

What values do the I/O operators (<< and >>) return? C++ allows you to define functions to associate with existing ope

原创 STL sort

詳細解說 STL 排序(Sort) 詳細解說 STL 排序(Sort) 作者Winter 詳細解說 STL 排序(Sort) 0 前言: STL,爲什麼你必須掌握1 STL提供的Sort 算法 1.1 所有sort算法介紹1.2 s

原创 C++ switch

switch語句在c或c++語言中是非常普通的一個語句了,而且我們也是經常用到的。而且我們使用的switch語句都是和case、default、break等語句一起使用的。 switch語句的使用可以非常的簡單,也可以非常的複雜,所以

原创 What values do the I/O operators (<< and >>) return?

What values do the I/O operators (<< and >>) return? C++ allows you to define functions to associate with existing ope

原创 realloc

realloc <cstdlib> void * realloc ( void * ptr, size_t size ); Reallocate memory block The size of the memory block

原创 virtual 關鍵字

Once a function is declared as virtual in a base class it remains virtual; nothing the derived classes do can change

原创 111205

C++允許將任何類型的指針賦給void*(這是void*的最初意圖,它需要足夠大,以存放任何類型的指針),但不允許直接將void*指針賦給任何其他類型的指針。(需要經過cast)