Category:C++
This programming language may be used to instruct a computer to perform a task.
Execution method: | Compiled (machine code) |
---|---|
Garbage collected: | No |
Parameter passing methods: | By reference, By value |
Type safety: | Safe, Unsafe |
Type strength: | Strong |
Type compatibility: | Nominative, Structural |
Type expression: | Explicit |
Type checking: | Dynamic, Static |
Lang tag(s): | cpp |
See Also: |
If you know C++, please write code for some of the tasks not implemented in C++.
C++ is named after the C language, from which it is derived. C++ extends C into an object-oriented language. However, unlike other object-oriented languages, it doesn't try to force you into object-oriented programming, but is a multi-paradigm language. Besides conventional procedural programming and object-oriented programming, it also supports generic programming.
The ++ in C++ is some what of an inside joke, in that C++ is C with a Post Increment operator attached, thus C++ is C + 1; however, this interpretation has the flaw that post-increment increments the value after returning the value, so the post-increment expression still evaluates to the value before the increment.
If you can't find an implementation for your task in the C++ category below, please look in the C category, as many of the tasks can be implemented identically in C and C++.
Versions[edit]
- C++98 is the version of C++ standardized by ISO in 1998. It is the most commonly used and supported version of the language. The term "C++" usually refers to C++98.
- C++03 is a minor improvement to C++98, standardized by ISO in 2003.
- TR1 (Technical Report 1) is a proposal for extensions to the C++ standard library. It was published in 2007. Many of its proposals made it into C++11. Many compilers support it, but put its headers in a different directory.
- C++11 (formerly called C++0x and sometimes C++1x) is a significant improvement, adding many new language features and libraries. It was standardized by ISO in 2011. Most of its features are available in GCC [1] and Clang [2].
- C++14 (formerly called C++1y) is a minor improvement to C++11, standardized by ISO in 2014. Most of its features are available in Clang [3] and GCC [4].
- C++17 (formerly called C++1z) is a minor improvement to C++14, standardized by ISO in 2017. Most of its features are available in Clang [5] and GCC [6].
- C++20 (formerly called C++2a) is a major upcoming improvement to C++17 first drafted in July 2017. What proposed features it will have is currently partially implemented by Clang [7] and GCC [8]
Subcategories
This category has the following 3 subcategories, out of 3 total.
Pages in category "C++"
The following 854 pages are in this category, out of 854 total.
A
- A* search algorithm
- A+B
- Abbreviations, automatic
- Abbreviations, easy
- Abbreviations, simple
- ABC Problem
- Abelian sandpile model
- Abstract type
- Abundant odd numbers
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- Active object
- Addition chains
- Address of a variable
- AKS test for primes
- Align columns
- Almost prime
- Amicable pairs
- Anagrams
- Anagrams/Deranged anagrams
- Angle difference between two bearings
- Animate a pendulum
- Animation
- Anonymous recursion
- Anti-primes
- Append a record to the end of a text file
- Apply a callback to an array
- Apply a digital filter (direct form II transposed)
- Approximate Equality
- Arbitrary-precision integers (included)
- Archimedean spiral
- Arena storage pool
- Arithmetic evaluation
- Arithmetic-geometric mean
- Arithmetic-geometric mean/Calculate Pi
- Arithmetic/Complex
- Arithmetic/Integer
- Arithmetic/Rational
- Array concatenation
- Array length
- Arrays
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Associative array/Merging
- Atomic updates
- Attractive numbers
- Average loop length
- Averages/Arithmetic mean
- Averages/Mean angle
- Averages/Mean time of day
- Averages/Median
- Averages/Mode
- Averages/Pythagorean means
- Averages/Root mean square
- Averages/Simple moving average
- AVL tree
B
- Babbage problem
- Bacon cipher
- Balanced brackets
- Balanced ternary
- Barnsley fern
- Base64 decode data
- Base64 encode data
- Bell numbers
- Benford's law
- Bernoulli numbers
- Best shuffle
- Binary digits
- Binary search
- Binary strings
- Bitmap
- Bitmap/Bresenham's line algorithm
- Bitmap/Flood fill
- Bitwise operations
- Boolean values
- Box the compass
- Brace expansion
- Brazilian numbers
- Break OO privacy
- Brownian tree
- Bulls and cows
- Bulls and cows/Player
- Burrows–Wheeler transform
C
- C++03
- C++11
- C++14
- C++98
- Caesar cipher
- Calculating the value of e
- Calendar
- Call a foreign-language function
- Call a function
- Call an object method
- Cantor set
- Card shuffles
- Cartesian product of two or more lists
- Case-sensitivity of identifiers
- Casting out nines
- Catalan numbers
- Catalan numbers/Pascal's triangle
- Catamorphism
- Chaocipher
- Chaos game
- Character codes
- Chebyshev coefficients
- Check output device is a terminal
- Check that file exists
- Checkpoint synchronization
- Chemical Calculator
- Chernick's Carmichael numbers
- Cheryl's Birthday
- Chinese remainder theorem
- Chinese zodiac
- Chowla numbers
- Circles of given radius through two points
- Classes
- Closest-pair problem
- Closures/Value capture
- Collections
- Colour bars/Display
- Colour pinstripe/Display
- Combinations
- Combinations with repetitions
- Comma quibbling
- Command-line arguments
- Comments
- Compare a list of strings
- Compile-time calculation
- Compound data type
- Concurrent computing
- Conditional structures
- Constrained genericity
- Constrained random points on a circle
- Continued fraction
- Continued fraction/Arithmetic/Construct from rational number
- Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N)
- Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N1, Contined Fraction N2)
- Convert seconds to compound duration
- Convex hull
- Conway's Game of Life
- Copy a string
- Copy stdin to stdout
- Count in factors
- Count in octal
- Count occurrences of a substring
- Count the coins
- Cramer's rule
- CRC-32
- Create a file
- Create a file on magnetic tape
- Create a two-dimensional array at runtime
- Create an HTML table
- Create an object at a given address
- CSV data manipulation
- CSV to HTML translation
- Cuban primes
- Cumulative standard deviation
- Currying
- CUSIP
- Cycle detection
D
- Damm algorithm
- Data Encryption Standard
- Date format
- Date manipulation
- Day of the week
- Days between dates
- De Bruijn sequences
- Deal cards for FreeCell
- Define a primitive data type
- Delegates
- Delete a file
- Department Numbers
- Detect division by zero
- Determine if a string has all the same characters
- Determine if a string has all unique characters
- Determine if a string is collapsible
- Determine if a string is numeric
- Determine if a string is squeezable
- Determine if only one instance is running
- Determine if two triangles overlap
- Digital root
- Digital root/Multiplicative digital root
- Dijkstra's algorithm
- Dining philosophers
- Discordian date
- Display a linear combination
- Diversity prediction theorem
- DNS query
- Dot product
- Doubly-linked list/Definition
- Doubly-linked list/Element definition
- Doubly-linked list/Element insertion
- Doubly-linked list/Traversal
- Dragon curve
- Draw a clock
- Draw a cuboid
- Dutch national flag problem
E
- Eban numbers
- Eertree
- Egyptian division
- Egyptian fractions
- Elementary cellular automaton
- Elementary cellular automaton/Infinite length
- Elementary cellular automaton/Random Number Generator
- Emirp primes
- Empty directory
- Empty program
- Empty string
- Enforced immutability
- Entropy
- Enumerations
- Environment variables
- Equilibrium index
- Ethiopian multiplication
- Euler method
- Euler's identity
- Euler's sum of powers conjecture
- Evaluate binomial coefficients
- Even or odd
- Evolutionary algorithm
- Exceptions
- Exceptions/Catch an exception thrown in a nested call
- Execute a Markov algorithm
- Execute a system command
- Execute Brain****
- Execute CopyPasta Language
- Execute HQ9+
- Execute SNUSP
- Exponentiation operator
- Extensible prime generator
- External sort
- Extract file extension
F
- Factorial
- Factors of a Mersenne number
- Factors of an integer
- Farey sequence
- Fast Fourier transform
- FASTA format
- Faulhaber's formula
- Faulhaber's triangle
- Feigenbaum constant calculation
- Fermat numbers
- Fibonacci heap
- Fibonacci n-step number sequences
- Fibonacci sequence
- Fibonacci word
- Fibonacci word/fractal
- File input/output
- File modification time
- File size
- Filter
- Find common directory path
- Find limit of recursion
- Find the intersection of a line with a plane
- Find the intersection of two lines
- Find the last Sunday of each month
- Find the missing permutation
- Finite state machine
- First perfect square in base N with N unique digits
- First-class functions
- Five weekends
- Fivenum
- FizzBuzz
- Flatten a list
- Flipping bits game
- Flow-control structures
- Floyd's triangle
- Floyd-Warshall algorithm
- Forest fire
- Fork
- Formatted numeric output
- Forward difference
- Four bit adder
- Four is magic
- Fractal tree
- Fraction reduction
- Fractran
- Function composition
- Function definition
- Function prototype
- Fusc sequence
G
- Galton box animation
- Gapful numbers
- General FizzBuzz
- Generate Chess960 starting position
- Generate lower case ASCII alphabet
- Generate random chess position
- Generator/Exponential
- Generic swap
- Geometric algebra
- Get system command output
- Globally replace text in several files
- Go Fish
- Gray code
- Greatest common divisor
- Greatest element of a list
- Greatest subsequential sum
- Greed
- Greyscale bars/Display
- Guess the number
- Guess the number/With feedback
- Guess the number/With feedback (player)
- GUI component interaction
- GUI enabling/disabling of controls
H
- Hailstone sequence
- Hamming numbers
- Handle a signal
- Happy numbers
- Harshad or Niven series
- Hash from two arrays
- Hash join
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newbie
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Hello world/Web server
- Here document
- Heronian triangles
- Hickerson series of almost integers
- Higher-order functions
- Hilbert curve
- Hofstadter Figure-Figure sequences
- Hofstadter Q sequence
- Hofstadter-Conway $10,000 sequence
- Honeycombs
- Horner's rule for polynomial evaluation
- Hostname
- HTTP
- Huffman coding
- Humble numbers
- Hunt The Wumpus
I
- I before E except after C
- IBAN
- Identity matrix
- Image noise
- Imaginary base numbers
- Include a file
- Increasing gaps between consecutive Niven numbers
- Increment a numerical string
- Infinity
- Inheritance/Multiple
- Inheritance/Single
- Input loop
- Input/Output for Pairs of Numbers
- Integer comparison
- Integer overflow
- Integer roots
- Integer sequence
- Intersecting Number Wheels
- Introspection
- Inverted index
- Inverted syntax
- Iterated digits squaring
J
K
L
- Lah numbers
- Langton's ant
- Largest int from concatenated ints
- Largest number divisible by its digits
- Last Friday of each month
- Latin Squares in reduced form
- Law of cosines - triples
- Leap year
- Least common multiple
- Left factorials
- Leonardo numbers
- Letter frequency
- Levenshtein distance
- Linear congruential generator
- Linux CPU utilization
- List comprehensions
- Literals/Integer
- Literals/String
- Logical operations
- Long multiplication
- Long primes
- Long year?
- Longest common prefix
- Longest common subsequence
- Longest Common Substring
- Longest increasing subsequence
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Increment loop index within loop body
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Lucas-Lehmer test
- Lucky and even lucky numbers
- Ludic numbers
- Luhn test of credit card numbers
- Lychrel numbers
- LZW compression
M
- MAC Vendor Lookup
- Mad Libs
- Magic 8-Ball
- Magic squares of doubly even order
- Magic squares of odd order
- Magic squares of singly even order
- Main step of GOST 28147-89
- Make directory path
- Man or boy test
- Mandelbrot set
- Map range
- Markov chain text generator
- Mastermind
- Matrix multiplication
- Matrix transposition
- Matrix-exponentiation operator
- Maximum triangle path sum
- Maze generation
- Maze solving
- MD5
- Memory allocation
- Memory layout of a data structure
- Menu
- Mersenne primes
- Mertens function
- Mian-Chowla sequence
- Middle three digits
- Minesweeper game
- Modular arithmetic
- Modular exponentiation
- Modular inverse
- Modulinos
- Monte Carlo methods
- Montgomery reduction
- Monty Hall problem
- Morse code
- Most frequent k chars distance
- Move-to-front algorithm
- Multi-dimensional array
- Multifactorial
- Multiple distinct objects
- Multiplication tables
- Multiplicative order
- Multisplit
- Munchausen numbers
- Munching squares
- Musical scale
- Mutex
- Mutual recursion
N
- N'th
- N-body problem
- N-queens problem
- N-smooth numbers
- Named parameters
- Narcissistic decimal number
- Nautical bell
- Negative base numbers
- Nested function
- Nim Game
- Non-continuous subsequences
- Non-decimal radices/Convert
- Non-decimal radices/Input
- Non-decimal radices/Output
- Nonoblock
- Nonogram solver
- Nth root
- Null object
- Number names
- Number reversal game
- Numeric error propagation
- Numerical integration
- Numerical integration/Gauss-Legendre Quadrature
- NYSIIS
O
P
- P-value correction
- Palindrome detection
- Palindromic gapful numbers
- Pangram checker
- Parallel Brute Force
- Parallel calculations
- Parametric polymorphism
- Parse an IP Address
- Parsing/RPN calculator algorithm
- Parsing/RPN to infix conversion
- Parsing/Shunting-yard algorithm
- Partial function application
- Particle Swarm Optimization
- Partition an integer X into N primes
- Pascal matrix generation
- Pascal's triangle
- Password generator
- Pattern matching
- Peaceful chess queen armies
- Pell's equation
- Penney's game
- Percentage difference between images
- Percolation/Bond percolation
- Percolation/Mean run density
- Perfect numbers
- Perfect shuffle
- Perfect totient numbers
- Permutation test
- Permutations
- Permutations by swapping
- Permutations with repetitions
- Pernicious numbers
- Phrase reversals
- Pick random element
- Pierpont primes
- Pig the dice game
- Pig the dice game/Player
- Pinstripe/Display
- Plasma effect
- Playfair cipher
- Playing cards
- Plot coordinate pairs
- Pointers and references
- Poker hand analyser
- Polymorphic copy
- Polymorphism
- Polynomial long division
- Polynomial regression
- Polyspiral
- Population count
- Power set
- Price fraction
- Primality by trial division
- Prime conspiracy
- Prime decomposition
- Primes - allocate descendants to their ancestors
- Primorial numbers
- Priority queue
- Probabilistic choice
- Program name
- Program termination
- Proper divisors
- Pythagoras tree
- Pythagorean quadruples
R
- Ramer-Douglas-Peucker line simplification
- Random number generator (device)
- Random number generator (included)
- Random numbers
- Range expansion
- Range extraction
- Ranking methods
- Rare numbers
- Rate counter
- Ray-casting algorithm
- RCRPG
- Read a configuration file
- Read a file line by line
- Read a specific line from a file
- Read entire file
- Readline interface
- Real constants and functions
- Recaman's sequence
- Record sound
- Recursive descent parser generator
- Reduced row echelon form
- Regular expressions
- Remove duplicate elements
- Remove lines from a file
- Rename a file
- Rep-string
- Repeat
- Repeat a string
- Resistor mesh
- Respond to an unknown method call
- Return multiple values
- Reverse a string
- Reverse words in a string
- Robots
- Rock-paper-scissors
- Roman numerals/Decode
- Roman numerals/Encode
- Roots of a function
- Roots of a quadratic function
- Roots of unity
- Rosetta Code/Rank languages by popularity
- Rot-13
- RPG Attributes Generator
- Run-length encoding
- Runge-Kutta method
S
- Safe addition
- Safe primes and unsafe primes
- Sailors, coconuts and a monkey problem
- Sattolo cycle
- Search a list
- Search a list of records
- SEDOLs
- Self-describing numbers
- Self-referential sequence
- Semiprime
- Semordnilap
- Send email
- Sequence of non-squares
- Sequence of primes by trial division
- Sequence of primorial primes
- Sequence: smallest number greater than previous term with exactly n divisors
- Sequence: smallest number with exactly n divisors
- Set
- Set of real numbers
- Set puzzle
- Seven-sided dice from five-sided dice
- Sexy primes
- SHA-1
- SHA-256
- Shoelace formula for polygonal area
- Short-circuit evaluation
- Show the epoch
- Sierpinski carpet
- Sierpinski pentagon
- Sierpinski triangle
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Simple windowed application
- Singleton
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Traversal
- Sleep
- Smarandache prime-digital sequence
- Smith numbers
- Snake
- Snake And Ladder
- Sockets
- Sokoban
- Solve a Hidato puzzle
- Solve a Holy Knight's tour
- Solve a Hopido puzzle
- Solve a Numbrix puzzle
- Sort a list of object identifiers
- Sort an array of composite structures
- Sort an integer array
- Sort disjoint sublist
- Sort numbers lexicographically
- Sort stability
- Sort three variables
- Sort using a custom comparator
- Sorting algorithms/Bead sort
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting Algorithms/Circle Sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Comb sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Cycle sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Patience sort
- Sorting algorithms/Permutation sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Radix sort
- Sorting algorithms/Selection sort
- Sorting algorithms/Shell sort
- Sorting algorithms/Sleep sort
- Sorting algorithms/Stooge sort
- Sorting algorithms/Strand sort
- Soundex
- Sparkline in unicode
- Special characters
- Spelling of ordinal numbers
- Spiral matrix
- Split a character string based on change of character
- Square but not cube
- Square-free integers
- Stable marriage problem
- Stack
- Stair-climbing puzzle
- State name puzzle
- Statistics/Basic
- Statistics/Normal distribution
- Stem-and-leaf plot
- Stern-Brocot sequence
- Stirling numbers of the first kind
- Stirling numbers of the second kind
- Straddling checkerboard
- Stream Merge
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Strip block comments
- Strip comments from a string
- Strip control codes and extended characters from a string
- Strip whitespace from a string/Top and tail
- Strong and weak primes
- Subleq
- Subset sum problem
- Substitution Cipher
- Substring
- Substring/Top and tail
- Subtractive generator
- Successive prime differences
- Sudoku
- Suffix tree
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of squares
- Sum to 100
- Sutherland-Hodgman polygon clipping
- Symmetric difference
- Synchronous concurrency
- System time
T
- Take notes on the command line
- Tarjan
- Temperature conversion
- Terminal control/Cursor positioning
- Terminal control/Display an extended character
- Terminal control/Hiding the cursor
- Terminal control/Ringing the terminal bell
- Ternary logic
- Test integerness
- Text between
- Text processing/1
- Text processing/2
- Text processing/Max licenses in use
- Textonyms
- The ISAAC Cipher
- The Name Game
- The Twelve Days of Christmas
- Thue-Morse
- Tic-tac-toe
- Time a function
- Tokenize a string
- Tokenize a string with escaping
- Top rank per group
- Topological sort
- Topswops
- Totient function
- Towers of Hanoi
- Trabb Pardo–Knuth algorithm
- Transportation problem
- Tree traversal
- Trigonometric functions
- Truncatable primes
- Truncate a file
- Twelve statements
- Two Sum
- Type detection
U
V
- Validate International Securities Identification Number
- Vampire number
- Van der Corput sequence
- Van Eck sequence
- Variable size/Get
- Variable size/Set
- Variables
- Variadic function
- Vector
- Vector products
- Verify distribution uniformity/Naive
- Vigenère cipher
- Vigenère cipher/Cryptanalysis
- VList
- Voronoi diagram
W
- Execution method/Compiled/Machine code
- Garbage collection/No
- Parameter passing/By reference
- Parameter passing/By value
- Typing/Safe
- Typing/Unsafe
- Typing/Strong
- Typing/Compatibility/Nominative
- Typing/Compatibility/Structural
- Typing/Expression/Explicit
- Typing/Checking/Dynamic
- Typing/Checking/Static
- Programming Languages
- Codepad languages
- Programming paradigm/Imperative
- Programming paradigm/Object-oriented
- Programming paradigm/Generic