# Linear C++
A C++ tutorial that can (hopefully?) be followed without jumping from chapter to chapter at every step.
## Downloads:
- [No project files](https://github.com/jesyspa/linear-cpp/archive/master.zip)
- [Code::Blocks project files](https://github.com/jesyspa/linear-cpp/archive/with_codeblocks_project_files.zip)
## Building
Via a bash shell, compiling all chapters:
```sh
for a in Chapter*; do g++ -std=c++11 -o "$a/out" "$a"/*.cpp; done
```
On OSX:
- You must install XCode and the Command Line Tools package. As of 9/04/2013, Mac OS X doesn't ship with a C++11 compiler.
- Then use clang to build:
```sh
for a in Chapter*; do clang++ --std=c++11 --stdlib=libc++ "$a"/*.cpp -o "$a"/out; done
```
Also, when compiling your own files on either of those two platforms, I recommend you add `-Wall` and `-Wextra` to your flags. Clang users may also want to add `-fsanitize=undefined`.
## Markdown and EPUB
Thanks to [@Gullumluvl](https://github.com/Gullumluvl) it's
possible to export these chapters as Markdown or epub files!
To do so, just run
```sh
./cpp_2_markdown.py Chapter\ NN*
```
where `NN` is the number of the chapter.
You can use
```sh
./cpp_2_markdown.py .
```
to build the whole book.
For building an epub, make sure you have `pandoc` and run
```sh
pandoc -M author=jesyspa \
--standalone \
-V 'header-includes="<style>pre > code.sourceCode {white-space: pre-wrap !important;}</style>"' \
--toc --toc-depth=1 \
-o linear-cpp.epub \
ebook.md
```
The `header-includes` argument is needed to wrap long code lines.
## Future plans
This project is discontinued. I don't plan to update it for
new C++ standards or add any new language features.
Outline of what's ~~coming~~ missing:
- Practical Examples
- Variants, Optional
- Most of inheritance
- Scope
- Storage Duration
- Undefined Behaviour
- File IO
- Libraries: Boost, Abseil...
- Metaprogramming
- C++14 and up
- The preprocessor
- Most C features
So while I'm glad people have found it useful, please *don't* rely on this by itself to learn C++!
It really only scratches the surface, and you'll do yourself
a service if you get a [good book](https://stackoverflow.com/q/388242/559931).
没有合适的资源?快使用搜索试试~ 我知道了~
An attempt at a C++ tutorial..zip
共83个文件
cpp:48个
hpp:32个
py:1个
需积分: 5 0 下载量 72 浏览量
2024-01-05
14:15:46
上传
评论
收藏 100KB ZIP 举报
温馨提示
An attempt at a C++ tutorial.
资源推荐
资源详情
资源评论
收起资源包目录
An attempt at a C++ tutorial..zip (83个子文件)
sss
Chapter 05 - Vectors
main.cpp 3KB
Chapter 14 - Project Overview
main.cpp 9KB
Chapter 03 - If
main.cpp 5KB
Chapter 16 - Basic Operator Overloading
lex.cpp 1KB
token.hpp 1KB
main.cpp 2KB
token.cpp 2KB
lex.hpp 153B
Chapter 17 - Member Functions
token.hpp 482B
main.cpp 3KB
token.cpp 724B
lexer.hpp 9KB
lexer.cpp 5KB
Chapter 06 - For
main.cpp 5KB
Chapter 18 - Recursion
parser.hpp 513B
token.hpp 482B
main.cpp 3KB
parser.cpp 5KB
token.cpp 724B
lexer.hpp 864B
lexer.cpp 2KB
Chapter 02 - Types and Variables
main.cpp 5KB
Chapter 07 - Functions
main.cpp 11KB
Chapter 12 - Function Templates
main.cpp 3KB
vector_algos.hpp 11KB
Chapter 10 - References
vector_algos.cpp 2KB
main.cpp 12KB
vector_algos.hpp 3KB
cpp_2_markdown.py 7KB
Chapter 20 - Function Objects
builtin_operations.hpp 313B
parser.hpp 200B
variable_expr.hpp 399B
expression.hpp 423B
token.hpp 482B
symbol_table.hpp 313B
main.cpp 4KB
symbol_table.cpp 250B
list_expr.cpp 1024B
parser.cpp 1KB
token.cpp 724B
builtin_operations.cpp 1KB
lexer.hpp 864B
number_expr.hpp 317B
number_expr.cpp 225B
lexer.cpp 2KB
list_expr.hpp 408B
variable_expr.cpp 379B
Chapter 04 - While
main.cpp 2KB
Chapter 08 - Using Multiple Files
vector_algos.cpp 1KB
main.cpp 5KB
vector_algos.hpp 4KB
Chapter 00 - Foreword
main.cpp 3KB
Chapter 09 - Iterators
vector_algos.cpp 12KB
main.cpp 1KB
vector_algos.hpp 444B
.gitignore 24B
Chapter 15 - Basic Structs
lex.cpp 2KB
token.hpp 3KB
main.cpp 2KB
lex.hpp 659B
Chapter 01 - Hello World
main.cpp 5KB
Chapter 11 - Standard Algorithms
vector_algos.cpp 6KB
main.cpp 3KB
vector_algos.hpp 555B
README.md 2KB
Chapter 19 - Inheritance
parser.hpp 343B
variable_expr.hpp 380B
expression.hpp 2KB
token.hpp 482B
main.cpp 3KB
list_expr.cpp 734B
parser.cpp 2KB
token.cpp 724B
lexer.hpp 864B
number_expr.hpp 1KB
number_expr.cpp 344B
lexer.cpp 2KB
list_expr.hpp 3KB
variable_expr.cpp 170B
Chapter 13 - Exceptions
main.cpp 9KB
math.cpp 1KB
io.hpp 1KB
math.hpp 444B
共 83 条
- 1
资源评论
Lei宝啊
- 粉丝: 1933
- 资源: 1331
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功