Difference between revisions of "CPP"

From ProgrammingExamples
Jump to: navigation, search
(General Examples)
 
(12 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
=== General Examples ===
 
=== General Examples ===
 +
* [[CPP/decltype|Get the type of a variable or function]]
 +
* [[CPP/bind|Bind different sets of arguments to a function]]
 +
* [[CPP/Pragma|Compile time output (pragma message)]]
 +
* [[CPP/CustomIterator|A custom iterator]]
 +
* [[CPP/StaticConstInitialization|Static const initialization]]
 +
* [[CPP/StaticInheritance|Static inheritance]]
 
* [[CPP/StaticFunction|Static function]]
 
* [[CPP/StaticFunction|Static function]]
 
* [[CPP/recursion|Recursion - a recursive function]]
 
* [[CPP/recursion|Recursion - a recursive function]]
Line 98: Line 104:
 
==== Vector ====
 
==== Vector ====
 
*[[CPP/STL/Vector|Vector]]
 
*[[CPP/STL/Vector|Vector]]
*[[CPP/STL/Vector/RemoveElement|Remove an element from a vector]]
+
*[[CPP/STL/Vector/RemoveElement|Remove an element from a vector]] delete, erase
 +
*[[CPP/STL/Vector/Reverse|Reverse the elements in a vector]]
  
 
==== Set ====
 
==== Set ====
Line 107: Line 114:
 
*[[CPP/STL/Set/SetCustomClass|Custom class]]
 
*[[CPP/STL/Set/SetCustomClass|Custom class]]
 
*[[CPP/STL/Set/SetCustomComparison|Custom comparison operator]]
 
*[[CPP/STL/Set/SetCustomComparison|Custom comparison operator]]
 +
*[[CPP/STL/Set/BoundedInsert|A custom function to insert an element into the set only if it is less than an element currently in the set, and keep the same size]]
  
 
=== STL Algorithms ===
 
=== STL Algorithms ===
Line 124: Line 132:
  
 
=== C++0x ===
 
=== C++0x ===
 +
*[[CPP/C++0x/TheBigFive|The Big Five]]
 
*[[CPP/C++0x/VectorInitialization|Vector initialization]]
 
*[[CPP/C++0x/VectorInitialization|Vector initialization]]
 
*[[CPP/C++0x/VectorMinMax|VectorMinMax]]
 
*[[CPP/C++0x/VectorMinMax|VectorMinMax]]
 
*[[CPP/C++0x/Hash|Hash]]
 
*[[CPP/C++0x/Hash|Hash]]
 
*[[CPP/C++0x/UnorderedSet|Unordered set]]
 
*[[CPP/C++0x/UnorderedSet|Unordered set]]
 +
*[[CPP/C++0x/Lambda|Lambda]]
  
 
=== Math ===
 
=== Math ===
Line 133: Line 143:
 
*[[CPP/Math/MinMax|Min and Max]]
 
*[[CPP/Math/MinMax|Min and Max]]
 
*[[CPP/Math/Trig|Trig functions]]
 
*[[CPP/Math/Trig|Trig functions]]
*[[CPP/Math/SumVector|Sum elements in a vector]]
+
*[[CPP/Math/SumVector|Sum elements in a vector (accumulate)]]
 
*[[CPP/Math/Pi|Mathematic constant Pi = 3.14...]]
 
*[[CPP/Math/Pi|Mathematic constant Pi = 3.14...]]
 +
*[[CPP/Math/Median|Median of a vector]]
  
 
=== C-Style Programming Techniques ===
 
=== C-Style Programming Techniques ===

Latest revision as of 08:58, 20 November 2016

C++

A statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as a "middle-level" language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language and originally named C with Classes. It was renamed C++ in 1983. (http://en.wikipedia.org/wiki/C++)


Formatting

General Examples

I/O

Strings

Classes

Templates

Loops

STL Data Structures

Vector

Set

STL Algorithms

Debugging

C++ TR1

C++0x

Math

C-Style Programming Techniques

Utility