Difference between revisions of "CPP"

From ProgrammingExamples
Jump to: navigation, search
(Create a dispatch page for the C++ examples)
 
 
(77 intermediate revisions by 7 users not shown)
Line 2: Line 2:
 
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++)
 
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++)
 
----
 
----
=== Programming Examples ===
+
=== Formatting ===
 +
* [[CPP/Formatting/Decimals|Number of decimals (fixed and setprecision)]]
 +
 
 +
=== 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/recursion|Recursion - a recursive function]]
 +
* [[CPP/unique_ptr|unique_ptr]]
 +
* [[CPP/Functor|Functor]]
 +
* [[CPP/ReturnByReference|Return a value by reference]]
 +
* [[CPP/IntToHex|Convert an int to hex]]
 +
* [[CPP/HexToInt|Convert a hex number to an int]]
 +
* [[CPP/AnonymousNamespace|Anonymous namespace]]
 +
* [[CPP/2DVector|2D Vector]]
 +
* [[CPP/AlphebetizeString|Alphabetize a vector of strings]]
 +
* [[CPP/ZeroPad|Pad a number with zeros]]
 +
* [[CPP/BinaryIO|Binary input and output]]
 +
* [[CPP/ExecuteLinuxCommand|Execute a linux command]]
 +
* [[CPP/Casting|Casting]]
 +
* [[CPP/KeyboardInput|Keyboard input]]
 +
* [[CPP/CommandLineArguments|Command line arguments]]
 +
* [[CPP/DeepCopy|Deep copy]]
 +
* [[CPP/DefaultArguments|Default arguments]]
 +
* [[CPP/Enum|Enum]]
 +
* [[CPP/Exceptions|Exceptions (try/catch)]]
 +
* [[CPP/Infinity|Infinity]]
 +
* [[CPP/Logging|Logging]]
 +
* [[CPP/Namespaces|Namespaces]]
 +
* [[CPP/NAN|NAN (not a number)]]
 +
* [[CPP/OverloadOperator|Overload operator]]
 +
* [[CPP/ParallelSort|Parallel sort]]
 +
* [[CPP/RandomNumbers|Random numbers]]
 +
* [[CPP/StringStream|StringStream]]
 +
* [[CPP/Struct|Struct]]
 +
* [[CPP/Switch|Switch]]
 +
* [[CPP/Typedef|Typedef]]
 +
* [[CPP/KeepSortedList|Keeping a Sorted List of Custom Records]]
 +
 
 +
=== I/O ===
 +
* [[CPP/IO/Setw|Column width (setw)]]
 +
* [[CPP/IO/FileInput|File input]]
 +
* [[CPP/IO/FileOutput|File output]]
 +
* [[CPP/IO/ReadingLines|Reading lines from a text file]]
 +
 
 +
=== Strings ===
 +
* [[CPP/Strings/Compare|Compare strings]]
 +
* [[CPP/Strings/Concatenate|Concatenate]]
 +
* [[CPP/Strings/CountCharacters|Count characters]]
 +
* [[CPP/Strings/Split|Split/parse]]
 +
* [[CPP/Strings/Case_Conversion|Case conversion]]
 +
* [[CPP/Strings/SingleCharacterTag|Find the contents of a single character tag]]
 +
* [[CPP/Strings/FindAndReplace|Replace a substring with a replacement string (find and replace)]]
 +
* [[CPP/Strings/Find|Find the position of a substring]]
 +
* [[CPP/Strings/DetectPunctuation|Detect punctuation (ispunct)]]
 +
 
 +
=== Classes ===
 +
* [[CPP/Classes/ConstructorInheritance|Constructor inheritance]]
 +
* [[CPP/Classes/InitializationList|Initialization list]]
 +
* [[CPP/Classes/DerivedClass|Derived class]]
 +
* [[CPP/Classes/DownCasting|Down casting]]
 +
* [[CPP/Classes/FriendClass|Friend class]]
 +
* [[CPP/Classes/NestedClasses|Nested classes]]
 +
* [[CPP/Classes/PureVirtualFunction|Pure virtual function]]
 +
* [[CPP/Classes/Singleton|Singleton]]
 +
* [[CPP/Classes/Conversion Function|Conversion Function]]
 +
 
 +
=== Templates ===
 +
* [[CPP/Templates/FunctionTemplateHeaderOnly|Function template (header only)]]
 +
* [[CPP/Templates/FunctionTemplateExplicitInstantiation|Function template (explicit instantiation)]]
 +
* [[CPP/FunctionTemplateSpecialization|Function template specialization]]
 +
* [[CPP/Templates/ClassTemplateHeaderOnly|Class template (header only)]]
 +
* [[CPP/Templates/ClassTemplateExplicitInstantiation|Class template (explicit instantiation)]]
 +
* [[CPP/Templates/MemberFunctionTemplate|A member function template]]
 +
* [[CPP/Templates/PartialClassSpecialization|Partially specialize a class template]]
 +
 
 +
=== Loops ===
 +
* [[CPP/Loops/DoWhile|Do while]]
 +
* [[CPP/Loops/While|While]]
 +
* [[CPP/Loops/For|For]]
 +
 
 +
=== STL Data Structures ===
 +
*[[CPP/STL/Complex|Complex]]
 +
*[[CPP/STL/Heap|Heap]]
 +
*[[CPP/STL/List|List]]
 +
*[[CPP/STL/Map|Map]]
 +
*[[CPP/STL/MultiMap|MultiMap]]
 +
*[[CPP/STL/MultiSet|MultiSet]]
 +
*[[CPP/STL/Pair|Pair]]
 +
*[[CPP/STL/PriorityQueue|Priority queue]]
 +
*[[CPP/STL/Queue|Queue]]
 +
*[[CPP/STL/Stack|Stack]]
 +
*[[CPP/STL/String|String]]
 +
*[[CPP/STL/Tuple|Tuple]]
 +
*[[CPP/STL/IteratorFromObject|Iterator from object]]
 +
 
 +
==== Vector ====
 +
*[[CPP/STL/Vector|Vector]]
 +
*[[CPP/STL/Vector/RemoveElement|Remove an element from a vector]] delete, erase
 +
*[[CPP/STL/Vector/Reverse|Reverse the elements in a vector]]
 +
 
 +
==== Set ====
 +
*[[CPP/STL/Set|Set]]
 +
*[[CPP/STL/Set/RemoveElement|Remove an element from a set]]
 +
*[[CPP/STL/Set/MergeSets|Merge sets]]
 +
*[[CPP/STL/Set/SearchForElement|Search for an element (find)]]
 +
*[[CPP/STL/Set/SetCustomClass|Custom class]]
 +
*[[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 ===
 +
* [[CPP/STL/RandomShuffle|Random shuffle]]
 +
* [[CPP/STL/Sort|Sort a vector]]
 +
* [[CPP/STL/SetDifference|Find the different elements in two containers (set_difference)]]
 +
* [[CPP/STL/RandomData|Random data (std::generate)]]
 +
* [[CPP/STL/ForEach|ForEach]]
 +
* [[CPP/STL/VectorMinAndMax|VectorMinAndMax]]
 +
 
 +
=== Debugging ===
 +
* [[CPP/Debugging/Assert|Assert]]
 +
* [[CPP/Debugging/LineNumbers|LineNumbers]]
 +
 
 +
=== C++ TR1 ===
 +
*[[CPP/TR1/Regex_Tokenising|Tokenising with RegEx]]
 +
 
 +
=== C++0x ===
 +
*[[CPP/C++0x/TheBigFive|The Big Five]]
 +
*[[CPP/C++0x/VectorInitialization|Vector initialization]]
 +
*[[CPP/C++0x/VectorMinMax|VectorMinMax]]
 +
*[[CPP/C++0x/Hash|Hash]]
 +
*[[CPP/C++0x/UnorderedSet|Unordered set]]
 +
*[[CPP/C++0x/Lambda|Lambda]]
 +
 
 +
=== Math ===
 +
*[[CPP/Math/Exponential|Exponential function]]
 +
*[[CPP/Math/MinMax|Min and Max]]
 +
*[[CPP/Math/Trig|Trig functions]]
 +
*[[CPP/Math/SumVector|Sum elements in a vector (accumulate)]]
 +
*[[CPP/Math/Pi|Mathematic constant Pi = 3.14...]]
 +
*[[CPP/Math/Median|Median of a vector]]
 +
 
 +
=== C-Style Programming Techniques ===
 +
* [[CPP/Array|Array]]
 +
* [[CPP/2DArray|2D Array]]
 +
* [[CPP/CharacterArray|Character array]]
 +
* [[CPP/Macros|Macros]]
 +
* [[CPP/FunctionPointer|Function pointer]]
 +
* [[CPP/VariableNumberOfArguments|Variable number of function arguments]]
 +
 
 +
=== Utility ===
 +
* [[CPP/Template Print|Generic Print]]
 +
* [[CPP/DataType Converter | Generic DataType Converter]]
 +
* [[CPP/Sockets | Sockets]]
 +
* [[CPP/PThreads | PThreads]]
 +
* [[CPP/TCPSocket | TCPSocket]]
 +
* [[CPP/Typeof | Typeof]]

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