| Line 1: |
Line 1: |
| − | {{Infobox programming language
| + | :''If you typed '''C#''' and arrived at this page, then see [[C-sharp]].'' |
| − | | name = C++
| + | {{A-Z}} |
| − | | logo = File:ISO C++ Logo.svg
| + | [[File:C cursiva.gif|thumb]] |
| − | | paradigm = [[Multi-paradigm programming language|Multi-paradigm]]:<ref name="stroustruptcpppl"/> [[procedural programming|procedural]], [[functional programming|functional]], [[object-oriented programming|object-oriented]], [[generic programming|generic]]
| + | '''C''' is the third ([[three|3rd]]) [[letter]] in the [[English language|English]] [[alphabet]] and [[ISO basic latin alphabet]]. |
| − | | year = 1983
| |
| − | | designer = [[Bjarne Stroustrup]]
| |
| − | | developer = Bjarne Stroustrup<br>[[Bell Labs]]<br>{{nobr|ISO/IEC JTC1/SC22/WG21}}
| |
| − | | latest_release_version = ISO/IEC 14882:2017
| |
| − | | latest_release_date = {{Start date and age|2017|12|01|df=yes}}
| |
| − | | latest_test_version =
| |
| − | | latest_test_date =
| |
| − | | typing = [[Static type|Static]], [[Type system#Safely and unsafely typed systems|unsafe]], [[Nominative type system|nominative]]
| |
| − | | implementations = {{nowraplinks}}[[C++ Builder]], [[clang]], [[Comeau C/C++]], [[GNU Compiler Collection|GCC]], [[Intel C++ Compiler]], [[Microsoft Visual C++]], [[Sun Studio (software)|Sun Studio]]{{nowraplinks end}}
| |
| − | | dialects = {{nowraplinks}}[[ISO/IEC 14882|ISO/IEC C++]] 1998, [[ISO/IEC 14882|ISO/IEC C++]] 2003, [[ISO/IEC 14882|ISO/IEC C++]] 2011, [[ISO/IEC 14882|ISO/IEC C++]] 2014, [[ISO/IEC 14882|ISO/IEC C++]] 2017,{{nowraplinks end}}
| |
| − | | influenced_by = [[C (programming language)|C]], [[Simula]], [[Ada (programming language)|Ada 83]], [[ALGOL 68]], [[CLU (programming language)|CLU]], [[ML (programming language)|ML]]<ref name="stroustruptcpppl">{{Cite book | last=Stroustrup | first=Bjarne | title=The C++ Programming Language | year=1997 | edition=Third | chapter=1 | isbn=0201889544 | oclc=59193992 | accessdate=25 February 2010}}</ref>
| |
| − | | influenced = [[Perl]]<!--1987-->, [[LPC (programming language)|LPC]]<!--1989-->, [[Lua]]<!--1993-->, [[Pike (programming language)|Pike]]<!-- 1994 -->, [[Ada (programming language)|Ada 95]]<!--1995-->, [[Java (programming language)|Java]]<!--1995-->, [[PHP]]<!--1995-->, [[D (programming language)|D]]<!--1999-->, [[C99]]<!--1999-->, [[C Sharp (programming language)|C#]]<!--2001-->, [[Falcon (programming language)|Falcon]]<!--2003-->
| |
| − | | operating_system = [[Cross-platform|Cross-platform (multi-platform)]]
| |
| − | | license =
| |
| − | | website =
| |
| − | | file_ext = .h .hh .hpp .hxx {{nowrap|.h++}} .cc .cpp .cxx {{nowrap|.c++}}
| |
| − | | wikibooks = C++ Programming
| |
| − | |logo caption=C++ logo used by ISO.}}
| |
| − | [[File:BjarneStroustrup.jpg|right|thumb|Bjarne Stroustrup, the creator of C++]]
| |
| − | '''C++''' (pronounced "see plus plus") is a [[computer]] [[programming language]] based on [[C programming language|C]]. It was created for writing programs for many different purposes. In the 1990s, C++ became one of the most used programming languages in the world.
| |
| | | | |
| − | The C++ programming language was developed by [[Bjarne Stroustrup]] at [[Bell Labs]] in the 1980s, and was originally named "C with classes". The language was planned as an improvement on the [[C programming language]], adding features based on [[object-oriented programming]]. Step by step, a lot of advanced features were added to the language, like [[operator overloading]], [[exception handling]] and [[templates (programming)|templates]].
| + | == Meanings for C == |
| | + | * In [[temperature]], ''°C'' means "degrees [[Celsius]]". |
| | + | * In [[music]], ''C'' is a [[Note (music)|note]]. |
| | + | * In [[chemistry]], ''C'' is the atom of [[carbon]], as in '''C'''<sub>40</sub>[[H]]<sub>56</sub>. |
| | + | * In [[physics]], ''c'' is the [[speed of light]], as in E=mc². |
| | + | * In [[Roman numeral]]s, ''C'' means "one [[hundred]]" (100). |
| | + | * There is a [[programming language]] called ''C'', see [[C programming language]]. |
| | + | * In [[electronics]], C is a type of [[battery]]. |
| | + | *C can also mean the [[copyright]] symbol |
| | + | == Pronunciation == |
| | + | *The letter "C" is pronounced as /k/.We can also say the letter "C" as /s/. |
| | + | *The letter "C"'s name ,in english, is "Cee"(said as /ˈsiː/). |
| | | | |
| − | '''[http://www.programstudio.online/2020/05/introduction-to-c.html C++] {{Webarchive|url=https://web.archive.org/web/20200713161758/https://www.programstudio.online/2020/05/introduction-to-c.html |date=2020-07-13 }}''' runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. '''C++''' is simple and practical approach to describe the concepts of [http://www.programstudio.online/2020/05/introduction-to-c.html '''C++''' for beginners] {{Webarchive|url=https://web.archive.org/web/20200713161758/https://www.programstudio.online/2020/05/introduction-to-c.html |date=2020-07-13 }} to advanced software engineers.
| + | {{stub}} |
| − | | + | {{wikt}} |
| − | C++ is a general-purpose programing language which means that it can be used to create different variety of applications. [https://codinggrammar.com/what-is-cpp-used-for/ C++ is used for] variety of application domains.
| + | {{commonscat}} |
| − | | |
| − | == Example ==
| |
| − | The following text is C++ source code and it will write the words "[[Hello world program|Hello World!]]" on the screen when it has been [[compiled language|compiled]] and is executed. This program is typically the first program a programmer would write while learning about programming languages.
| |
| − | <syntaxhighlight lang="cpp">
| |
| − | // This is a comment. It's for *people* to read, not computers. It's usually used to describe the program.
| |
| − | | |
| − | // Make the I/O standard library available for use in the program.
| |
| − | #include <iostream>
| |
| − | using namespace std;
| |
| − | // We are now defining the main function; it is the function run when the program starts.
| |
| − | int main()
| |
| − | { | |
| − | // Printing a message to the screen using the standard output stream std::cout.
| |
| − | cout << "Hello World!";
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − | This program is similar to the last, except it will add 3 + 2 and print the answer instead of "Hello World!".
| |
| − | | |
| − | <syntaxhighlight lang="cpp">
| |
| − | #include <iostream>
| |
| − | | |
| − | int main()
| |
| − | { | |
| − | // Print a simple calculation.
| |
| − | std::cout << 3 + 2;
| |
| − | } | |
| − | </syntaxhighlight>
| |
| − | | |
| − | This program subtracts, multiplies, divides and then prints the answer on the screen.
| |
| − | <syntaxhighlight lang="cpp">
| |
| − | #include <iostream>
| |
| − | | |
| − | int main()
| |
| − | {
| |
| − | // Create and initialize 3 variables, a, b, and c, to 5, 10, and 20.
| |
| − | int a = 5;
| |
| − | int b = 10;
| |
| − | int c = 20;
| |
| − | | |
| − | // Print calculations.
| |
| − | std::cout << a-b-c;
| |
| − | std::cout << a*b*c;
| |
| − | std::cout << a/b/c;
| |
| − | } | |
| − | </syntaxhighlight>
| |
| − | | |
| − | == References ==
| |
| − | {{reflist}} | |
| − | | |
| − | | |
| − | {{Tech-stub}}
| |
| − | {{authority control}}
| |
| − | [[Category:Programming languages]]
| |