Open main menu

CDOT Wiki β

Changes

Team Darth Vector

480 bytes added, 19:37, 16 December 2017
A Comparison from STL
queue<type> SenecaYorkTimHortons;
}
</pre>
 
<u>'''Memory Allocater'''</u>
The use of a memory allocator allows more precise control over how dynamic memory is created and used. It is the default memory allocation method(ie not the "new" keyword) for all STL containers. The allocaters allow memory to scale rather then using delete and 'new' to manage a container's memory. They are defined within the header file "'''<memory>'''" and are coded as:
<pre>
#include <memory>
 
void foo(){
std::allocater<type> name;
}
</pre>
129
edits