Category:C++: Difference between revisions
Content added Content deleted
(Try a 'derived from' property. Perhaps we can use that for language history.) |
m (Removed dead/broken link) |
||
(17 intermediate revisions by 10 users not shown) | |||
Line 9: | Line 9: | ||
|compat=both |
|compat=both |
||
|tags=cpp |
|tags=cpp |
||
|hopl id=1202 |
|||
|LCT=yes |
|LCT=yes |
||
|bnf=http://cpp.comsci.us/syntax/statement/index.html}}{{codepad}}{{allows|Network access}}{{allows|Database access |
|bnf=http://cpp.comsci.us/syntax/statement/index.html}}{{codepad}}{{allows|Network access}}{{allows|Database access |
||
}}{{allows|Concurrency}}{{provides|Run time polymorphism}}{{provides|Compile time polymorphism}}{{allows|Windowing UI}}{{allows|Graphics}}{{allows|OpenGL}}{{allows|Dynamic linking}}{{provides|File access}}{{allows|File system access}}{{provides|Objects}}{{allows|Signal handling}}{{provides|Mutable state}} |
|||
'''C++''' is named after the |
'''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-[[:Category:Programming Paradigms|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++. |
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== |
|||
* '''C++98''' is the version of C++ standardized by ISO in 1998. |
|||
* '''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]] [http://gcc.gnu.org/projects/cxx0x.html] and [[Clang]] [http://clang.llvm.org/cxx_status.html]. |
|||
* '''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]] [http://clang.llvm.org/cxx_status.html], [[GCC]] [http://gcc.gnu.org/projects/cxx1y.html], and [[Visual C++]][https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160]. |
|||
* '''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]] [http://clang.llvm.org/cxx_status.html], [[GCC]] [https://gcc.gnu.org/projects/cxx-status.html#cxx17], and [[Visual C++]][https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160]. |
|||
* '''C++20''' (formerly called '''C++2a''') is a major improvement to C++17, standardized by ISO in 2020. Most of its features are implemented by [[Clang]] [http://clang.llvm.org/cxx_status.html], [[GCC]] [https://gcc.gnu.org/projects/cxx-status.html#tses], and [[Visual C++]][https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160] |
|||
* '''C++23''' (alternatively '''C++2b''') is a minor improvement to C++20, expected to be standardized by ISO in 2023. Experimental support exists in [[GCC]][https://gcc.gnu.org/projects/cxx-status.html#cxx23] and [[Clang]][https://clang.llvm.org/cxx_status.html] |
|||
{{language programming paradigm|Imperative}} |
{{language programming paradigm|Imperative}} |
||
{{language programming paradigm|Object-oriented}} |
{{language programming paradigm|Object-oriented}} |
||
{{language programming paradigm|Functional}} |
|||
{{language programming paradigm|Generic}} |
{{language programming paradigm|Generic}} |
||
<br clear="both"> |
<br clear="both"> |
Latest revision as of 19:28, 16 July 2023
C++
This programming language may be used to instruct a computer to perform a task.
Listed below are all of the tasks on Rosetta Code which have been solved using 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: |
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.
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
- C++98 is the version of C++ standardized by ISO in 1998.
- 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], GCC [4], and Visual C++[5].
- 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 [6], GCC [7], and Visual C++[8].
- C++20 (formerly called C++2a) is a major improvement to C++17, standardized by ISO in 2020. Most of its features are implemented by Clang [9], GCC [10], and Visual C++[11]
- C++23 (alternatively C++2b) is a minor improvement to C++20, expected to be standardized by ISO in 2023. Experimental support exists in GCC[12] and Clang[13]
Subcategories
This category has the following 3 subcategories, out of 3 total.
@
- C++ examples needing attention (empty)
- C++ Implementations (10 P)
- C++ User (330 P)
Pages in category "C++"
The following 200 pages are in this category, out of 1,284 total.
(previous page) (next page)F
- Fixed length records
- FizzBuzz
- Flatten a list
- Flipping bits game
- Flow-control structures
- Floyd's triangle
- Floyd-Warshall algorithm
- Forest fire
- Fork
- Formatted numeric output
- Fortunate numbers
- Forward difference
- Four bit adder
- Four is magic
- Four is the number of letters in the ...
- Four sides of square
- Fractal tree
- Fraction reduction
- Fractran
- Frobenius numbers
- FTP
- Function composition
- Function definition
- Function prototype
- Fusc sequence
G
- Galton box animation
- Gamma function
- Gapful numbers
- Gauss-Jordan matrix inversion
- Gaussian elimination
- 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
- Getting the number of decimal places
- Giuga numbers
- Globally replace text in several files
- Go Fish
- Goldbach's comet
- Golden ratio/Convergence
- Graph colouring
- Gray code
- Greatest common divisor
- Greatest element of a list
- Greatest subsequential sum
- Greed
- Greedy algorithm for Egyptian fractions
- 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
- Halt and catch fire
- Hamming numbers
- Handle a signal
- Happy numbers
- Harmonic series
- Harshad or Niven series
- Hash from two arrays
- Hash join
- Hashtron inference
- 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
- Hex words
- Hickerson series of almost integers
- Higher-order functions
- Hilbert curve
- History variables
- Hofstadter Figure-Figure sequences
- Hofstadter Q sequence
- Hofstadter-Conway $10,000 sequence
- Holidays related to Easter
- Honaker primes
- Honeycombs
- Horizontal sundial calculations
- Horner's rule for polynomial evaluation
- Host introspection
- Hostname
- HTTP
- Huffman coding
- Humble numbers
- Hunt the Wumpus
I
- I before E except after C
- I'm a software engineer, get me out of here
- IBAN
- Iccanobif primes
- Identity matrix
- Image noise
- Imaginary base numbers
- Implicit type conversion
- Include a file
- Inconsummate numbers in base 10
- Increasing gaps between consecutive Niven numbers
- Increment a numerical string
- Infinity
- Inheritance/Multiple
- Inheritance/Single
- Inner classes
- Input loop
- Input/Output for lines of text
- Input/Output for pairs of numbers
- Integer comparison
- Integer long division
- Integer overflow
- Integer roots
- Integer sequence
- Intersecting number wheels
- Introspection
- Inverted index
- Inverted syntax
- ISBN13 check digit
- Isograms and heterograms
- Isqrt (integer square root) of X
- Iterated digits squaring
- Iterators
J
K
- K-d tree
- Kahan summation
- Kaprekar numbers
- Kernighans large earthquake problem
- Keyboard input/Obtain a Y or N response
- Klarner-Rado sequence
- Knapsack problem/0-1
- Knapsack problem/Bounded
- Knapsack problem/Continuous
- Knapsack problem/Unbounded
- Knight's tour
- Knuth shuffle
- Knuth's algorithm S
- Koch curve
- Kolakoski sequence
- Kosaraju
- Kronecker product
- Kronecker product based fractals
L
- L-system
- Lah numbers
- Langton's ant
- Largest difference between adjacent primes
- Largest int from concatenated ints
- Largest number divisible by its digits
- Largest proper divisor of n
- Last Friday of each month
- Last letter-first letter
- Last list item
- Latin Squares in reduced form
- Law of cosines - triples
- Leap year
- Least common multiple
- Left factorials
- Legendre prime counting function
- Length of an arc between two angles
- Leonardo numbers
- Letter frequency
- Levenshtein distance
- Levenshtein distance/Alignment
- Line circle intersection
- Linear congruential generator
- Linux CPU utilization
- List comprehensions
- List rooted trees
- Literals/Floating point
- Literals/Integer
- Literals/String
- Logical operations
- Logistic curve fitting in epidemiology
- Long literals, with continuations
- Long multiplication
- Long primes
- Long year
- Longest common prefix
- Longest common subsequence
- Longest common substring
- Longest common suffix
Categories:
- 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/Functional
- Programming paradigm/Generic