Code
shared_ptr, unique_ptr and weak_ptr
shared_ptr, unique_ptr and weak_ptr are three useful smart pointers that holds a reference which will help us managing our pointers easier.
The Standard Template Library (STL) is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functors, and iterators.
shared_ptr, unique_ptr and weak_ptr are three useful smart pointers that holds a reference which will help us managing our pointers easier.
好多人都喜欢重新造一个轮子, 所以这个世界上的的轮子千奇百怪. 作为在这些轮子下面苟延残喘的洒家,往往不得不无尽的寻找两个轮子之间转换的方法. STL库, 作为标准库, 在写C++的时候理所当然的, 被各种使用. const char * 数组, 作为和C一起过来的小伙伴, 在很多场合下也会被调用. 如果脑抽居然还打算使用Qt, 那么,Qt自带的QString, 恐怕也很难有人能完全不使用. 于是乎, 类型转换就是个问题了. (more…)