Gang Of Coders
Home
About Us
Contact Us
All Std Solutions on Gang of Coders
Total of 74 Std Solutions
Why is "using namespace std;" considered bad practice?
C++
Namespaces
Std
Using Directives
C++ Faq
How to find out if an item is present in a std::vector?
C++
Vector
Std
What's the difference between "STL" and "C++ Standard Library"?
C++
Stl
Std
C++ Standard-Library
C++ Faq
Why would I ever use push_back instead of emplace_back?
C++
C++11
Std
Can you remove elements from a std::list while iterating through it?
C++
List
Std
cout is not a member of std
C++
Io
Std
Member
Cout
Replace part of a string with another string
C++
String
Replace
Substring
Std
Compelling examples of custom C++ allocators?
C++
Memory Management
Std
Memory Alignment
Allocator
printf with std::string?
C++
String
Namespaces
Printf
Std
How do I reverse a C++ vector?
C++
Vector
Stl
Std
Deleting elements from std::set while iterating
C++
Iterator
Set
Std
C++ Standard-Library
Should I use std::function or a function pointer in C++?
C++
Function
C++11
Callback
Std
A std::map that keep track of the order of insertion?
C++
Dictionary
Std
Insertion Order
declaring a priority_queue in c++ with a custom comparator
C++
Std
Priority Queue
How to get error message when ifstream open fails
C++
Error Handling
Stream
Std
How to declare std::unique_ptr and what is the use of it?
C++
Pointers
Std
Unique Ptr
When using C headers in C++, should we use functions from std:: or the global namespace?
C++
Language Lawyer
Std
Why is there no std::stou?
C++
String
C++11
Std
Why is rand()%6 biased?
C++
Random
Std
Is there a range class in C++11 for use with range based for loops?
C++
C++11
Range
Std
Ranged Loops
How do I Search/Find and Replace in a standard string?
C++
Replace
Std
Prevent function taking const std::string& from accepting 0
C++
String
Std
Implicit Conversion
Why isn't std::initializer_list a language built-in?
C++
C++11
Std
Initializer List
How do I combine hash values in C++0x?
C++
C++11
Boost
Hash
Std
In C++ check if std::vector<string> contains a certain value
C++
Vector
Std
Stdvector
cc1plus: error: unrecognized command line option "-std=c++11" with g++
C++
C++11
Compiler Errors
G++
Std
Can a declaration affect the std namespace?
C++
Std
Reserved
Passing std::string by Value or Reference
C++
String
Std
Move Semantics
What would 'std:;' do in c++?
C++
Std
Colon
How is std::is_function implemented?
C++
Templates
Std
Sfinae
What is the performance overhead of std::function?
C++
Boost
Std
Sorting std::map using value
C++
Dictionary
Std
Converting std::__cxx11::string to std::string
C++
String
C++11
Types
Std
error C2065: 'cout' : undeclared identifier
C++
Namespaces
Visual Studio-2010
Std
Obtaining list of keys and values from unordered_map
C++
Vector
C++11
Std
Unordered Map
Append an int to a std::string
C++
Std
Why am I getting string does not name a type Error?
C++
String
Std
std::lexical_cast - is there such a thing?
C++
Parsing
Casting
Std
C++ Standard-Library
What would be a "Hello, World!" example for "std::ref"?
C++
C++11
Std
Ref
do I need to close a std::fstream?
C++
Std
Fstream
Ofstream
Why does unique_ptr take two template parameters when shared_ptr only takes one?
C++
C++11
Std
Shared Ptr
Unique Ptr
'vector' in namespace 'std' does not name a type
C++
Std
Stdvector
What is the fastest way to change a key of an element inside std::map
C++
Performance
Dictionary
Binary Tree
Std
What's the difference between std::advance and std::next?
C++
C++11
Std
When is it necessary to use the flag -stdlib=libstdc++?
C++
Gcc
C++11
Std
Libstdc++
How to convert std::chrono::time_point to calendar datetime string with fractional seconds?
C++
Datetime
C++11
Std
Chrono
Why does std::map not have a const accessor?
C++
C++11
Std
How can I insert element into beginning of vector?
C++
Visual C++
Vector
Std
std vector C++ -- deep or shallow copy
C++
Vector
Copy
Std
Deep Copy
std::put_time implementation status in GCC?
C++
Gcc
C++11
Std
Chrono
How to create an std::function from a move-capturing lambda expression?
C++
Lambda
Std
C++14
Ambiguous overload call to abs(double)
C++
Std
Cmath
How can I use Standard Library (STL) classes in my dll interface or ABI?
C++
Dll
C++11
Stl
Std
std::string vs string in c++
C++
String
Std
Does std::vector.clear() do delete (free memory) on each element?
C++
Std
How to iterate over a std::map full of strings in C++
C++
Dictionary
Iterator
Std
Stdmap
What can and can't I specialize in the std namespace?
C++
C++11
Std
Explicit Specialization
What is the use of "using namespace std"?
C++
Namespaces
Std
Using
Is it good practice to use std::vector as a simple buffer?
C++
Std
Stdvector
Why has std::reduce been added in C++17?
C++
Std
C++17
How is std::string implemented?
C++
String
Std
Cstring
Does `sizeof` *really* evaluate to a `std::size_t`? Can it?
C++
C++11
Std
Language Lawyer
C++ create string of text and variables
C++
String
Variables
Std
std::shared_ptr thread safety
C++
Std
Shared Ptr
string in namespace std does not name a type
C++
String
Namespaces
Std
Fast way to write data from a std::vector to a text file
C++
Std
Ofstream
Make custom type "tie-able" (compatible with std::tie)
C++
C++11
Tuples
Std
What's the difference between cstdlib and stdlib.h?
C++
Std
Why are std::begin and std::end "not memory safe"?
C++
C++11
Iterator
Std
Why Can't I store references in a `std::map` in C++?
C++
Dictionary
Reference
Std
Stdmap
Is there a tab equivalent of std::endl within the standard library?
C++
Std
Why is the destructor of a future returned from `std::async` blocking?
C++
Multithreading
C++11
Asynchronous
Std
Why does the string returned by ctime() contain a line feed?
C++
C
String
Time
Std
C++ std::tuple order of destruction
C++
C++11
Std
Stdtuple