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 From c0e5292022e4885619a91b0353e5fd83c457feed Mon Sep 17 00:00:00 2001 From: Marcel Ribeiro-Dantas Date: Tue, 2 Aug 2022 23:23:36 -0300 Subject: Update to uppercase for c++ and c# in index --- 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 038c3900..33ef70f3 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -1,5 +1,5 @@ --- -language: c++ +language: C++ filename: learncpp.cpp contributors: - ["Steven Basart", "https://github.com/xksteven"] -- cgit v1.2.3 From 5faaf058e1fa5f4d1da6d00948f94c88b058d68d Mon Sep 17 00:00:00 2001 From: bharathcs Date: Mon, 29 Aug 2022 13:13:34 +0800 Subject: Update C++ docs to improve clarity on namespace. Make it immediately obvious what importing a namespace does, instead of just listing how to use fully qualified symbols. --- c++.html.markdown | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'c++.html.markdown') diff --git a/c++.html.markdown b/c++.html.markdown index 33ef70f3..499eb669 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -158,6 +158,10 @@ namespace Second { { printf("This is Second::foo\n"); } + void bar() + { + printf("This is Second::bar\n"); + } } void foo() @@ -168,10 +172,12 @@ void foo() int main() { // Includes all symbols from namespace Second into the current scope. Note - // that simply foo() no longer works, since it is now ambiguous whether - // we're calling the foo in namespace Second or the top level. + // that while bar() works, simply using foo() no longer works, since it is + // now ambiguous whether we're calling the foo in namespace Second or the + // top level. using namespace Second; + bar(); // prints "This is Second::bar" Second::foo(); // prints "This is Second::foo" First::Nested::foo(); // prints "This is First::Nested::foo" ::foo(); // prints "This is global foo" -- cgit v1.2.3