Click here to Skip to main content
15,888,351 members
Everything / STL

STL

STL

Great Reads

by Thorsten Ottosen
Are you tired of filling data manually into STL containers? With the Initialization Library it gets a lot easier.
by Shmuel Zang
This article shows how we can implement a thread-safe events (similar to .NET events) mechanism using the standard C++ library.
by JadBenAutho
Efficient and standalone library for NTP server/client utilizing pure C++
by Michael Dunn
Create custom tasks in your app's jump list on Windows 7

Latest Articles

by JadBenAutho
Efficient and standalone library for NTP server/client utilizing pure C++
by Vadim Stadnik
Simple and useful alternative to traditional memory pool
by Steffen Ploetz
Is LINQ the right technology for processing large amounts of data in runtime-relevant environments?
by honey the codewitch
std::chrono doesn't work on the Teensy? Oh no! Here's how to fix it.

All Articles

Sort by Title

STL 

16 Apr 2001 by Igor Sukhov
The ATL and MFC versions of the class that implements a dialog for selecting users(computers) within the Windows Network.
19 Aug 2003 by Ryan Binns
An implementation of synchronous .NET style delegates in non - .NET VC++ 6.
11 Mar 2013 by AssemblySoft
A trivial business logic layer from scratch with a TDD approach.
27 Sep 2010 by ZhaoRuFei
This article provides a macro + template solution to support .NET-like Reflection for enums such as ToString, IsDefined, Parse, GetValues, GetNames.
19 Jan 2003 by peterchen
Setting up doxygen, a free tool to document your code, in a few simple steps.
15 Jun 2003 by Mike Melnikov
Google-like Toolbar with customization from xml file and update from web features
4 Jul 2009 by Kannan Ramanathan
Is it possible to have a 32bit client initialize/invoke methods in a 64bit local COM server? If yes, how do I set up the Proxy/stub DLLs? The target OS I have in mind is Vista64 or Win7-64 (so the 32bit client will be running from with in WOW64)....
4 Jul 2009 by Kannan Ramanathan
One more req I have to worry abt: The 64bit local server should be able to implement connection points (32bit client being the sink)...is this possible? Thanks.
18 Nov 2012 by Mark Vinod Sinnathamby
The 3-dimensional co-ordinate space
18 Nov 2012 by Mark Vinod Sinnathamby
Multiple and nested coordinate spaces
10 Dec 2012 by Mark Vinod Sinnathamby
3D Game Math Primer 3: What are Vectors anyway?
29 Dec 2012 by Mark Vinod Sinnathamby
3D Game Math Primer 4: Operations on Vectors
2 Aug 2003 by Nikolai Teofilov
An ATL/STL ActiveX control based on OpenGL library for 3D data visualization
10 Sep 2013 by Pablo Aliskevicius
Memory reallocation generated by string concatenations can create performance bottlenecks. .NET has System.Text.StringBuilder, JavaScript has Array.join, and we have string::reserve.
24 Jan 2005 by Christos Malliopoulos
A template-library for calculating arithmetic and logical expressions.
7 Jun 2004 by Giannakakis Kostas
A generic class implementing an exhaustive searching algorithm for solving a variety of puzzles and riddles
16 May 2008 by freejack
An STL based C++ utility class to parse structured config files.
22 May 2008 by Alex C. Punnen
The Command Pattern and Chain of Responsibility for implementing a plug-in Thread Pool library.
13 Oct 2001 by George Anescu
A C++ STL Tokenizer class capable to tokenize a string when the set of character separators is specified by another string
26 May 2003 by George Anescu
Presenting some algorithms for operations with large integer numbers in a C++ class using the STL vector container
18 Apr 2006 by Carl Ge
A string class based on STL and that can be used like the CStringT in MFC.
30 Oct 2006 by Joaquín M López Muñoz
A block allocator for use with STL containers that greatly improves speed in programs doing massive data insertions and extractions.
21 Aug 2015 by Sibeesh Passion
Hi Today we will create a drag and drop game which uses jquery drag drop functions. We will create two boxes, from one box we need to drag the content box and drop the same to another box. We will be using sortable function and its events. I hope you will like this game. Background […]
23 May 2008 by Jeffrey Walton
Create a File Checksum Shell Menu Extension using ATL and Crypto++
24 May 2007 by Nicolas Bonamy
A grid to display and edit properties of objects (as in Visual Studio)
21 Mar 2004 by Nemanja Trifunovic
A policy based deletion functor that can be used with for_each function.
15 Aug 2004 by __PPS__
Shows how simple accessing Windows Registry can be if you do not need bells and whistles.
6 Mar 2006 by Joerg Wiedenmann
A handy and customizable tokenizer function that works with STL strings.
9 Feb 2006 by Gary J. Kuehn
A small introduction to the Boost Bind and Function libraries.
26 May 2020 by stefan stammberger
A novel allocator implementation for managing huge sets of data in STL's std:: containers for Windows operating systems
25 Apr 2010 by Scot Brennecke
A string array class using MFC or STL that performs very fast multiple string searches
3 Nov 2003 by Nitron
Presenting the std::vector with a discussion on STL algorithms and predicates.
2 Jan 2013 by Bruce Hsu
Hi, AllRecently I try to use std::function and Lambda expression to simply my code.However there are some weird problems.#include #include #include int main(int argc, char *argv[]){ std::function arr[]={ [&](int n)->bool...
20 Mar 2013 by cocaf
How to show progress in a Boost test application.
12 Nov 2002 by User 9885
A ref-counted pointer class that supports polymorphic types
29 Jan 2009 by logicchild
An article to help explain how C/C++ use pointers.
25 Feb 2004 by Alberto Bar-Noy
A simple reminder tool to remind you of your overdue tasks in ToDoList throughout the day
12 Sep 2003 by Jonathan de Halleux
A helper framework for generation of SQL queries in C++ and Lua
8 Aug 2007 by Andre Ladeira
A class to create a NT service with a few lines of code
23 Nov 2019 by Zhaohui Xing (Joey)
Swift classes for algorithm, including single linked list class, stack class, queue class
3 Jul 2002 by Daniel Andersson
Writing generic code with templates and the C++ standard library.
14 Jan 2015 by Rob Kraft
A simple build summary email for your development environment. Tests included
7 Jan 2008 by Jarl Ostensen
A finite field EC and simple ECC scheme in C++ to help understand the principles.
16 May 2000 by David Hubbard
This is a small non-validating XML parser based purely on STL
19 Jun 2005 by Tobias Wenig
Writing multiple enumerated configuration entries.
3 Dec 2006 by JPandya
A study of STL container, Iterator and Predicates with the discussion of std::vector
11 Feb 2006 by PJ Arends
Presents a header file that allows a single source file that uses STL to be built in either ANSI or Unicode, without any changes or lots of #ifdefs.
16 May 2016 by Keyhole Software
AngularJS is a popular framework used for building single-page applications. One great benefit of using Angular is that it is easy to incorporate automated testing. I have been using Angular on various projects for a few years now, so naturally I was curious to learn what’s new in Angular 2.
9 Apr 2008 by User 9885
A cross-platform thread pooling implementation
23 May 2003 by Tony Ioanides
An alternative approach to selecting date ranges.
15 Jul 2009 by Jeffrey Walton, Jordan Walters
A UTF-16 class derived from CStdioFile for reading and writing Unicode files
6 Jul 2008 by jangtimjang
A ready-to-use wrapper class for creating a shortcut (.lnk file) and a bookmark (.url file) and finally attaching an online icon resource to it.
21 Mar 2001 by Zhaohui Xing (Joey)
This article focuses on giving an example of using the DirectX API in PC game software development by using a DirectSound wrapper class
10 Apr 2006 by Yubo Dong
A simple wrapper class for the libid3tag to retrieve id3 tag information from a given MP3 file.
31 Aug 2001 by Paul A. Howes
A WTL adaptation of James Twine's Dim Edit control.
22 Jan 2002 by Noel Frankinet
7 Dec 2012 by zhangdian
#include #include #include using namespace std;int main(){ vector coll; char str[20]; for(int i = 0; i > str; coll.push_back(str); } for(int i = 0; i
7 Dec 2012 by Pakh
The strings are succesfully added in the vector your problem is in printing themBecause you are printing str over and over (3 times) instead of printing coll[i].Change this cout
7 Dec 2012 by Stephen Hewitt
for(int i = 0; i
7 Dec 2012 by Philippe Mori
You should use std::string instead of char *.You always push the same address (str) in the vector and since the vector contains pointers and not values, the values are not copied. Thus you have added 3 time a pointer to the same address and since the content change at each iteration, at...
30 Oct 2012 by denghuancong
dll.cpp:#include #ifdef __cplusplusextern "C" {#endifvoid show(){ fprintf(stdout,"%s","dll show call.");}#ifdef __cplusplus}#endifdll_1.cpp:#include "dll.h"map g_map;int register_funk(string xx,fn_cmd_handler_t fn, string dex)...
30 Oct 2012 by Richard MacCutchan
You have not put any values into your map so you cannot use an indexer to refer to an element within it. My bad.
30 Oct 2012 by denghuancong
no , when i use g_map[xx],it will auto create key=xx and a value.
30 Oct 2012 by pasztorpisti
Both your static int __inss and map g_map; are global variables and the order of their initialization isn't specified because they reside in separate .cpp and .obj files. In your case you were not lucky and __inss was initialized before g_map so g_map is used before its actual...
16 Jun 2008 by MoustafaS
Solving old ACM problems
17 Nov 2006 by Vincent Godin
A tiny library that adds color to CRT programs.
24 Jul 2008 by Simon Parmenter
A VS2008 C++ project to add an icon resource in a file to an executable.
28 May 2003 by adrian cooper
A beginner's guide to adding a binary resource in visual studio and a simple class for programmatical extraction.
30 Sep 2002 by Ernest Laurentin
Shows how to use Microsoft Script Hosting inside existing ATL/WTL Application
28 Aug 2001 by Fayez Al-Mutairi
An advanced COM component that provides file upload capabilities for your ASP pages.
27 Feb 2011 by Mladen Janković
Implementing AI for the Target Number game using a genetic algorithm.
30 Jun 2001 by PaulWendt
A scrolling banner control containing strings with individual styles and colors.
23 Sep 2007 by rtybase
A Java like threading framework.
3 Feb 2002 by Michael Dunn
An advanced utility that scans computers for missing hotfixes, and helps you download and install them.
13 Sep 2005 by Dr. Goulu
DicoLib stores words in lists of anagrams indexed by their length and a 26 bits bitset which describe which letters are present in the words. This makes it extremely fast to search for words which contain specified letters, and to search for words which are "close" for spell checking appli
6 May 2020 by Arthur V. Ratz
In this article, I’d like to introduce the modern code in C++11, implementing the parallel three-way quicksort, which is asymptotically faster and more efficient than the famous heapsort and mergesort algorithms.
22 Jun 2022 by Stephane Capo
C++ optimization for map using string key among others
1 Jul 2012 by Ajay Vijayvargiya
Let's dwell deeper into C++ templates!
11 Nov 2003 by Nitron
This article presents an in-depth analysis of std::deque and offers guidance as to when to prefer using it as opposed to std::vector, by taking into consideration memory allocation and container performance.
6 Jul 2003 by Andrew Walker
An overview of the Boost library
9 Oct 2004 by Dave Handley
Basic introduction to producing parsers with the boost::spirit library.
17 Aug 2020 by Espen Harlinn
Ranges is coming to C++, and the Range-v3 library was the basis for the proposal to add range support to the C++ standard library
23 May 2000 by David Hubbard
An STL starter that introduces the various collection types, strings, streams, iterators and methods of STL
17 Jun 2013 by geoyar
An MFC linear chart control with enhanced appearance.
28 Nov 2002 by Martin Holzherr
A template container which implements set/multiset functionality using a vector
7 Nov 2002 by Leor Zolman
A set of tools to shorten the length of VC++ STL-related error messages so that the most vital information from a message fits within the status bar in VS.
28 May 2002 by Jack Hui
A multi-node Tree class by using map and vector
31 Oct 2006 by Joaquín M López Muñoz
A template container implementing a bidirectional map that blends well with STL.
3 Apr 2003 by Mo Hossny
An STL-Like Vector with Matlab indexing facilities.
20 Nov 2009 by DavidSchmitt
Android development FAIL
8 Feb 2009 by Member 3375334
Hello everyone,i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it's different. I...
8 Feb 2009 by Stuart Dootson
I'd just draw on a plain dialog surface. Create a dialog-based MFC application. Draw your lines and things in the dialog's OnPaint handler. Add button click handlers for the dialog.
1 Jun 2011 by Maximilien
is there any way to qualify the members of an std::pair with something more meaningful that just first and second ?for example : std::pair value;value.first = something;value.second = somethingelse;I'd like to have std::pair value;value.myfirstvalue...
5 Jun 2011 by Stefan_Lang
If you have a compound object containing this pair, you can add references to the two elements. References are not objects and as such don't take additional space. They only work as an alias, and that is what you apparently want:class MyClass { std::pair mypair; int&...
1 Jun 2011 by CPallini
There are several ways (some make poor sense), for instance you may use preprocessor macros or if you're concerned about, two methods (of course, in order to implement the methods you've to derive from the pair struct).
1 Jun 2011 by ARopo
Could you use inheritence class MyPair : private std::pair { public: void SetMyFirstValue(int value) { first=value; } void SetMySecondValue(int value) { second=value; } int GetMyFirstValue() { return first; } int GetMySecondValue() { return second; } ...
1 Jun 2011 by Alain Rist
This should do it, keeping the original std::pair functionality:struct MyPair : std::pair{ typedef std::pair Pair; int & something; int & somethingelse; MyPair() : something(Pair::first), somethingelse(Pair::second) {} MyPair(const...
2 Oct 2023 by sahil ajmeri 2022
I have STL file where I want to apply 4x4 matrix. The matrix I want to apply is: [[2.7282, 0, 0, 0], [0, 4.0014, 0, 0], [0, 0, 1, 0], [0,�0,�0,�1]] Here is my STL file: https://we.tl/t-v6SHprAeUZ[^] I have used Python code to apply matrix...