From 4176277ba7cb7c8c2e5a5dd00b4ba63920fb8ff6 Mon Sep 17 00:00:00 2001 From: Lilian Besson Date: Sun, 31 Jan 2021 21:55:38 +0100 Subject: Update c++.html.markdown Just forcing http:// links to be https:// when possible. I also read everything carefully and didn't find any mistake or easy improvements I could add (but I'm not that familiar with C++) --- c++.html.markdown | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'c++.html.markdown') diff --git a/c++.html.markdown b/c++.html.markdown index 948b52ec..6e94e03e 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -2,16 +2,16 @@ language: c++ filename: learncpp.cpp contributors: - - ["Steven Basart", "http://github.com/xksteven"] + - ["Steven Basart", "https://github.com/xksteven"] - ["Matt Kline", "https://github.com/mrkline"] - ["Geoff Liu", "http://geoffliu.me"] - - ["Connor Waters", "http://github.com/connorwaters"] - - ["Ankush Goyal", "http://github.com/ankushg07"] + - ["Connor Waters", "https://github.com/connorwaters"] + - ["Ankush Goyal", "https://github.com/ankushg07"] - ["Jatin Dhankhar", "https://github.com/jatindhankhar"] --- C++ is a systems programming language that, -[according to its inventor Bjarne Stroustrup](http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/Keynote), +[according to its inventor Bjarne Stroustrup](https://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/Keynote), was designed to - be a "better C" @@ -37,7 +37,7 @@ one of the most widely-used programming languages. // Just like in C, your program's entry point is a function called // main with an integer return type. // This value serves as the program's exit status. -// See http://en.wikipedia.org/wiki/Exit_status for more information. +// See https://en.wikipedia.org/wiki/Exit_status for more information. int main(int argc, char** argv) { // Command line arguments are passed in by argc and argv in the same way @@ -483,7 +483,7 @@ public: void setOwner(const std::string& dogsOwner); // Override the behavior of the print function for all OwnedDogs. See - // http://en.wikipedia.org/wiki/Polymorphism_(computer_science)#Subtyping + // https://en.wikipedia.org/wiki/Polymorphism_(computer_science)#Subtyping // for a more general introduction if you are unfamiliar with // subtype polymorphism. // The override keyword is optional but makes sure you are actually @@ -616,7 +616,7 @@ boxOfBox.insert(intBox); // template // instead. The 'class' keyword and 'typename' keywords are _mostly_ // interchangeable in this case. For the full explanation, see -// http://en.wikipedia.org/wiki/Typename +// https://en.wikipedia.org/wiki/Typename // (yes, that keyword has its own Wikipedia page). // Similarly, a template function: @@ -660,7 +660,7 @@ printMessage<10>(); // Prints "Learn C++ faster in only 10 minutes!" ///////////////////// // The standard library provides a few exception types -// (see http://en.cppreference.com/w/cpp/error/exception) +// (see https://en.cppreference.com/w/cpp/error/exception) // but any type can be thrown as an exception #include #include @@ -1030,7 +1030,7 @@ sort(dog_ids.begin(), dog_ids.end(), [&weight](const int &lhs, const int &rhs) { return weight[lhs] < weight[rhs]; }); // Note we captured "weight" by reference in the above example. -// More on Lambdas in C++ : http://stackoverflow.com/questions/7627098/what-is-a-lambda-expression-in-c11 +// More on Lambdas in C++ : https://stackoverflow.com/questions/7627098/what-is-a-lambda-expression-in-c11 /////////////////////////////// // Range For (C++11 and above) @@ -1106,7 +1106,8 @@ f1 = f2; #include -// Conceptually, Tuples are similar to old data structures (C-like structs) but instead of having named data members, +// Conceptually, Tuples are similar to old data structures (C-like structs) +// but instead of having named data members, // its elements are accessed by their order in the tuple. // We start with constructing a tuple. -- cgit v1.2.3 From 3cdecb5941f6f06bc9d942641622614359bf6980 Mon Sep 17 00:00:00 2001 From: James <31216671+JamesC01@users.noreply.github.com> Date: Mon, 1 Nov 2021 21:24:35 +0000 Subject: Add learncpp.com to further reading (#4237) I've been learning from this site, and it seems good, and the general consensus online is that it's one of the better online tutorials/books for learning C++. --- c++.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'c++.html.markdown') diff --git a/c++.html.markdown b/c++.html.markdown index 6e94e03e..4399d946 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -1196,5 +1196,6 @@ compl 4 // Performs a bitwise not Further Reading: * An up-to-date language reference can be found at [CPP Reference](http://cppreference.com/w/cpp). -* Additional resources may be found at [CPlusPlus](http://cplusplus.com). +* A tutorial for beginners or experts, covering many modern features and good practices: [LearnCpp.com](https://www.learncpp.com/) * A tutorial covering basics of language and setting up coding environment is available at [TheChernoProject - C++](https://www.youtube.com/playlist?list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb). +* Additional resources may be found at [CPlusPlus](http://cplusplus.com). -- cgit v1.2.3 From 6a111647579a2ac97f14a10e572be217cd3c514e Mon Sep 17 00:00:00 2001 From: Alan Chang Date: Tue, 4 Jan 2022 00:36:58 +0800 Subject: [c++/en] Fix newline error (#4176) * Fix newline error * use std::endl --- c++.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c++.html.markdown') diff --git a/c++.html.markdown b/c++.html.markdown index 4399d946..038c3900 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -946,7 +946,7 @@ mymap.insert(pair('Z',26)); // To iterate map::iterator it; for (it=mymap.begin(); it!=mymap.end(); ++it) - std::cout << it->first << "->" << it->second << std::cout; + std::cout << it->first << "->" << it->second << std::endl; // Output: // A->1 // Z->26 -- cgit v1.2.3