Skip to content

Commit b5b81f0

Browse files
committed
Improve index
1 parent 987b26f commit b5b81f0

14 files changed

+936
-633
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Cannoe be a symlink.
1+
# Cannot be a symlink.
22
language: cpp

CONTRIBUTING.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# CONTRIBUTING
2+
3+
## Style
4+
5+
Non-portable features shall be clearly separated from portable ones in either:
6+
7+
- ifdef macro blocks
8+
- separate files
9+
- separate directories
10+
- separate repositories
11+
12+
This includes features which were not present in the first standardized version of languages. E.g., C99 features must be put inside `#ifdf __STDC_VERSION__` blocks.
13+
14+
Everything that can be checked in an assertion will be checked, and will not get printed.
15+
16+
For example, a C addition operator `+` test should be done as:
17+
18+
assert(1 + 1 == 2);
19+
20+
and *never*:
21+
22+
printf("%d\n", 1 + 1);
23+
24+
so that all can be verified automatically.
25+
26+
Features which yield unpredictable outputs can print results to stdout. For example, `time(NULL)`
27+
28+
printf("%d\n", 1 + 1);
29+
30+
Features that:
31+
32+
- require user input such as C `scanf`
33+
- make programs wait for perceptible amounts of time
34+
35+
shall be put inside a block analogous to a `if (0){ ... }` to be turned on only when users want to test those specific features.
36+
37+
Cheat source comments are written in markdown *indented by headers* and commented out.
38+
39+
Every important keyword that one might search for in the feature has a hash before it, e.g. `#function`, `#include`, `#printf`, etc.

README.md

+32-110
Original file line numberDiff line numberDiff line change
@@ -6,113 +6,35 @@ C and C++ information, cheatsheets and mini-projects.
66

77
Relies on <https://github.com/cirosantilli/cpp-boilerplate> to factor code out. See [its documentation](https://github.com/cirosantilli/cpp-boilerplate/blob/master/README.md) for information on how to use this project.
88

9-
## Most useful files
10-
11-
- [c.c](c.c): C cheatsheet
12-
- [cpp.cpp](main_cpp.cpp): C++ cheatsheet
13-
- [POSIX](posix/): POSIX C API
14-
- [Multi-file](multifile/): `include`, `extern` vs `static`, dynamic libraries, cross language calls
15-
- [GCC](gcc/): GCC extensions
16-
- [OpenGL](opengl/)
17-
- [KDE](kde/)
18-
19-
Other files:
20-
21-
- [Boost](boost/)
22-
- [Flex and Bison](flex-bison/)
23-
- [GDB](gdb.md)
24-
- [glibc](glibc/)
25-
- [Implementations](implementations.md)
26-
- [Style guides](style-guides.md)
27-
- [CMake](cmake.md)
28-
- [hello_world.c](hello_world.c)
29-
- [hello_world_cpp.cpp](hello_world_cpp.cpp)
30-
31-
GUI:
32-
33-
- [GTK](gtk/)
34-
- [Qt](qt/)
35-
- [X11](x11)
36-
- [Open GL](opengl/)
37-
38-
Scientific:
39-
40-
- [Fortran](fortran/)
41-
- [GSL](gsl/)
42-
- [LAPACK](lapack/)
43-
- [OpenCV](opencv/)
44-
- [PLplot](plplot/)
45-
46-
## Dependencies
47-
48-
Most builds require:
49-
50-
- `make` (POSIX)
51-
- `gcc` >= 4.7
52-
- `g++` >= 4.7
53-
54-
Even though we use GNU tools by default, great attention is paid to portability of portable subjects like ANSI C, which should compile in any compiler.
55-
56-
In addition, each directory may have their own extra dependencies as stated in their README.
57-
58-
You can install dependencies on latest LTS Ubuntus with:
59-
60-
./configure
61-
62-
Other system install are not going to be supported as that would lead to too much maintenance overhead. If you don't have Ubuntu, consider using our [Vagrantfile](Vagrantfile).
63-
64-
## Usage
65-
66-
When there are multiple files compiled, e.g.:
67-
68-
c.c -> c
69-
cpp.cpp -> cpp
70-
71-
run a given file by specifying the basename without extension:
72-
73-
make run=c
74-
make run=cpp
75-
76-
The `=` sign is *not* optional!
77-
78-
Doing just `make run` in those cases will run the default file: `main`.
79-
80-
## Style
81-
82-
Non-portable features shall be clearly separated from portable ones in either:
83-
84-
- ifdef macro blocks
85-
- separate files
86-
- separate directories
87-
- separate repositories
88-
89-
This includes features which were not present in the first standardized version of languages. E.g., C99 features must be put inside `#ifdf __STDC_VERSION__` blocks.
90-
91-
Everything that can be checked in an assertion will be checked, and will not get printed.
92-
93-
For example, a C addition operator `+` test should be done as:
94-
95-
assert(1 + 1 == 2);
96-
97-
and *never*:
98-
99-
printf("%d\n", 1 + 1);
100-
101-
so that all can be verified automatically.
102-
103-
Features which yield unpredictable outputs can print results to stdout. For example, `time(NULL)`
104-
105-
printf("%d\n", 1 + 1);
106-
107-
Features that:
108-
109-
- require user input such as C `scanf`
110-
- make programs wait for perceptible amounts of time
111-
112-
shall be put inside a block analogous to a `if (0){ ... }` to be turned on only when users want to test those specific features.
113-
114-
Cheat source comments are written in markdown *indented by headers* and commented out.
115-
116-
Every important keyword that one might search for in the feature has a hash before it, e.g. `#function`, `#include`, `#printf`, etc.
117-
118-
##
9+
1. [Getting started](getting-started.md)
10+
1. Best content
11+
1. [c.c](c.c): C cheatsheet
12+
1. [cpp.cpp](main_cpp.cpp): C++ cheatsheet
13+
1. [POSIX](posix/): POSIX C API
14+
1. [Multi-file](multifile/): `include`, `extern` vs `static`, dynamic libraries, cross language calls
15+
1. [GCC](gcc/): GCC extensions
16+
1. [OpenGL](opengl/)
17+
1. [KDE](kde/)
18+
1. Other files
19+
1. [Boost](boost/)
20+
1. [Flex and Bison](flex-bison/)
21+
1. [GDB](gdb.md)
22+
1. [glibc](glibc/)
23+
1. [Implementations](implementations.md)
24+
1. [Style guides](style-guides.md)
25+
1. [CMake](cmake.md)
26+
1. [hello_world.c](hello_world.c)
27+
1. [hello_world_cpp.cpp](hello_world_cpp.cpp)
28+
1. GUI
29+
1. [GTK](gtk/)
30+
1. [Qt](qt/)
31+
1. [X11](x11)
32+
1. [Open GL](opengl/)
33+
1. Scientific
34+
1. [Fortran](fortran/)
35+
1. [GSL](gsl/)
36+
1. [LAPACK](lapack/)
37+
1. [OpenCV](opencv/)
38+
1. [PLplot](plplot/)
39+
1. [CONTRIBUTING](CONTRIBUTING.md)
40+
1. [Bibliography](bibliography.md)

bibliography.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Bibliography
2+
3+
## Free
4+
5+
- <http://www.cplusplus.com>
6+
7+
Explains well what most the features of the language do for beginners.
8+
9+
Not official in any way, despite the amazing URL and Google rank.
10+
11+
Is said to contain many errors, and that `cppreference` is superior.
12+
13+
- <http://en.cppreference.com/w/>
14+
15+
Similar to `cplusplus.com`, but seems to have more info.
16+
17+
Wiki driven.
18+
19+
Attempts to document all the language and stdlibs.
20+
21+
Many behaviour examples.
22+
23+
- <http://www.parashift.com/c++-faq/index.html>
24+
25+
C++ FAQ.
26+
27+
Deep and extensive tutorial.
28+
29+
- <http://herbsutter.com/gotw/>
30+
31+
Herb Sutter Guru of the week.
32+
33+
Hard topics with simple examples.
34+
35+
- <http://yosefk.com/c++fqa/>
36+
37+
Comments on the quirks of c++.
38+
39+
Fun and informative for those that know the language at intermediate level.
40+
41+
- <http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp>
42+
43+
IBM implementation of C++.
44+
45+
Contains a few extension, but lots of well explained docs with many examples.
46+
47+
Contains clear examples and explanations on very specific subjects.
48+
49+
Horrible navigation and URLs.
50+
51+
- <http://www.agner.org/optimize/>
52+
53+
Hardcore optimization tutorials for C++ and assembly.
54+
55+
## Non-free
56+
57+
- <http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list>
58+
59+
List of books.

0 commit comments

Comments
 (0)