[C++] Note of priority_queue of STL
priority_queue is a queue container provided in the C++ Standard Template Library (STL), which returns the element with the highest priority first.
Read More »[C++] Note of priority_queue of STLpriority_queue is a queue container provided in the C++ Standard Template Library (STL), which returns the element with the highest priority first.
Read More »[C++] Note of priority_queue of STLWhen we got the following error message with deque or vector container of C++ STL (Standard Template Library):
Read More »[Solved][C++] No matching member function for call to 'push_back' errorWhen we are programming with C++ and we want to store some data, in addition to use the array, we use the "vector" in the standard library.
Read More »[C++] How to Initialize Std::Vector of Two or Higher Dimensionsmap is the Associative Container of Standard Template Library (STL), it is a container that has key-value correspondence.
Read More »[C++] How to Use "map" of STLThe string
template in C++ STL is very convenient in processing strings. To record today is how to find the specific text or substring in a string
data type variable.
In C++, we always can be clear about the data type of the variables we declared; however, sometimes we passed in some parameters from third-party libraries, so we are not so sure which data type it is.
Read More »[C++] How to Check The Variable Data Type with typeid()If you want to print a string data type variable in C programming language, you can use the following code:
Read More »[Solved][C++] cannot pass non-trivial object of type 'std::__1::string' (aka 'basic_stringWhen I was solving LeetCode questions recently, I got an error that did not provide any line number:
Read More »[Solved] ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000000d4 at pc 0x0000003a4fa9 bp 0x7ffedf29d730 sp 0x7ffedf29d728 READ of size 4 at 0x6020000000d4 thread T0deque is the double-ended queue container provided by C++ Standard Template Library (STL), it is similar with vector container, but if you want to add a new element to the beginning in a vector, the time complexity is O(N), but in a deque it is O(1).
Read More »[C++] How to Use "deque" of STLstring is a string container provided by C++ Standard Template Library (STL). Compared with char, you can do more complex string operations.
Read More »[C++] How to Use "string" of STL