Difference between revisions of "CPP"
From ProgrammingExamples
Daviddoria (Talk | contribs) (→Math) |
Daviddoria (Talk | contribs) (→General Examples) |
||
Line 6: | Line 6: | ||
=== General Examples === | === General Examples === | ||
+ | * [[CPP/StaticInheritance|Static inheritance]] | ||
* [[CPP/StaticFunction|Static function]] | * [[CPP/StaticFunction|Static function]] | ||
* [[CPP/recursion|Recursion - a recursive function]] | * [[CPP/recursion|Recursion - a recursive function]] |
Revision as of 15:48, 19 December 2011
Contents
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
- Static inheritance
- Static function
- Recursion - a recursive function
- unique_ptr
- Functor
- Return a value by reference
- Convert an int to hex
- Convert a hex number to an int
- Anonymous namespace
- 2D Vector
- Alphabetize a vector of strings
- Pad a number with zeros
- Binary input and output
- Execute a linux command
- Casting
- Keyboard input
- Command line arguments
- Deep copy
- Default arguments
- Enum
- Exceptions (try/catch)
- Infinity
- Logging
- Namespaces
- NAN (not a number)
- Overload operator
- Parallel sort
- Random numbers
- StringStream
- Struct
- Switch
- Typedef
- Keeping a Sorted List of Custom Records
I/O
Strings
- Compare strings
- Concatenate
- Count characters
- Split/parse
- Case conversion
- Find the contents of a single character tag
- Replace a substring with a replacement string (find and replace)
- Find the position of a substring
- Detect punctuation (ispunct)
Classes
- Constructor inheritance
- Initialization list
- Derived class
- Down casting
- Friend class
- Nested classes
- Pure virtual function
- Singleton
- Conversion Function
Templates
- Function template (header only)
- Function template (explicit instantiation)
- Function template specialization
- Class template (header only)
- Class template (explicit instantiation)
- A member function template
- Partially specialize a class template
Loops
STL Data Structures
- Complex
- Heap
- List
- Map
- MultiMap
- MultiSet
- Pair
- Priority queue
- Queue
- Stack
- String
- Tuple
- Iterator from object
Vector
Set
- Set
- Remove an element from a set
- Merge sets
- Search for an element (find)
- Custom class
- Custom comparison operator
STL Algorithms
- Random shuffle
- Sort a vector
- Find the different elements in two containers (set_difference)
- Random data (std::generate)
- ForEach
- VectorMinAndMax
Debugging
C++ TR1
C++0x
Math
- Exponential function
- Min and Max
- Trig functions
- Sum elements in a vector
- Mathematic constant Pi = 3.14...
- Median of a vector