GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - izikorgad/learnmoderncpp-tutorial: Complete, working programs, plus Markdown sources, from the C++ tutorial hosted at learnmoderncpp.com

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

50 Commits
50 Commits

Folders and files

NameName
Last commit message
Last commit date
headers
headers
 
 
modules
modules
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
00-about-this-tutorial.md
00-about-this-tutorial.md
 
 
01-string-and-character-literals.md
01-string-and-character-literals.md
 
 
02-variables-scopes-and-namespaces.md
02-variables-scopes-and-namespaces.md
 
 
03-conditions-and-operators.md
03-conditions-and-operators.md
 
 
04-functions.md
04-functions.md
 
 
05-arrays-pointers-and-loops.md
05-arrays-pointers-and-loops.md
 
 
06-enums-and-structs.md
06-enums-and-structs.md
 
 
07-strings-containers-and-views.md
07-strings-containers-and-views.md
 
 
08-files-and-formatting.md
08-files-and-formatting.md
 
 
09-classes-friends-and-polymorphism.md
09-classes-friends-and-polymorphism.md
 
 
10-templates-exceptions-lambdas-smart-pointers.md
10-templates-exceptions-lambdas-smart-pointers.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

learnmoderncpp-tutorial

Contents

All of the source Markdown pages for the Modern C++ Tutorial on https://learnmoderncpp.com/ plus complete, working programs machine-extracted from the course text.

Note: Some Chapters have had significant changes made to update them to C++23, and not all programs compile successfully yet. In particular, use of std::println() with import std; does not compile. In case of issues with your compiler please see the Releases page for the C++20 version of the Tutorial.

The "headers" subdirectory contains C++ programs with legacy header #includes, whilst the "modules" subdirectory contains the same programs using the import keyword instead. See https://learnmoderncpp.com/2020/09/05/where-are-c-modules/ for more details about C++ compilers which have support for modules.

The "scripts" subdirectory contains a C++ program which extracts all programs from the Markdown source to the above two folders.

Compiling under Windows

Most programs compile successfully under Windows with Visual Studio 2022 (v17.8 or later), some of the modules versions (as noted above) do not currently compile.

The supplied batch scripts build-vs2022-headers.bat and build-vs2022-modules.bat can be used to compile all of the programs within a Visual Studio command prompt, simply run:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat

or similar in a command window, or create a desktop link, and then run either of the build scripts.

Alternatively, to compile individual programs from within a Visual Studio command prompt, run either (modules):

cl /EHsc /std:c++latest /MTd 00-example.cpp

or (headers):

cl /EHsc /std:c++latest 00-example.cpp

substituting the correct file for 00-example.cpp in either case. Note that the modules versions need file std.obj in the current directory, see the build script for how to create this.

Compiling under Linux

To compile individual programs in the "headers" subdirectory under Linux, use:

g++ -std=c++23 -o 00-example 00-example.cpp

or:

clang++ -std=c++23 -o 00-example 00-example.cpp

substituting both occurrencies of 00-example with the correct file name.

Alternatively, run one of the supplied shell scripts build-gcc-headers.sh or build-clang-headers.sh which are supplied in the "headers/build" subdirectory, or build-clang-modules.sh found in the "modules/build" subdirectory.

About

Complete, working programs, plus Markdown sources, from the C++ tutorial hosted at learnmoderncpp.com

learnmoderncpp.com/2019/08/03/welcome/

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.