C++ references of websites, books, code and APIs for learning C/C++.
Abstract
Programming is a science as well as an art. Developing the required skills takes time and effort and an enthusiasm to learn. The learning draws parallels with that of learning a natural language such as English.
Just as the required skills to learn a natural language are reading, listening, writing and speaking, so the skills for learning a programming language are reading code, writing code. Also just as we need to know the proper language constructs like grammar (syntax), contextual use of language (semantics), we need to learn the syntax as well as
Like learning natural language involves listening as a major component, programming language skills are developed by reading lots of good code. It exposes the learner to good programming practices.
Project Euler Weekly addition of a new problem that demands skills in mathematics and programming. A fun way to start learning programming and mathematics in a hand-in-glove manner.
Libraries
Some famous libraries that help in learning how APIs are written. By reading their source code, one can learn how good programmers structure their code and also how to abstract functionality so that code has increased reusability quotient.
OpenGLM OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software.
SDL2 Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
BLAS Basic Linear Algebra Subroutines are Fortran routines that provide basic building blocks for basic vector and matrix operations. There is a C/C++ interface.
Level-1 BLAS performs scalar, vector and vector-vector operations,
Level-2 BLAS performs matrix-vector operations,
Level-3 BLAS performs matrix-matrix operations.
LAPACK Linear Algebra PACKage utilizes BLAS subroutines to provide routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided. There is a C/C++ interface.
OpenGL The Industry’s Foundation for High Performance Graphics
OpenCV (Open Source Computer Vision library)
is an open source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products.
Hands on Tutorials
Following are hands on tutorials for various aspects of program development. As a typical cycle of program development involves
writing source code
compiling the code
debugging the code
Writing C/C++ program (#TODO)
Tutorials explaining good programming practices while writing code are given here. Some esoteric aspects of writing good code, which I cannot at the current moment categorize them due to my own lack of understanding, are
avoiding hard coding
practing a convention for writing code. Though there is no C++ standard for writing the code, in order for the code to be readable, we need to adopt one convention and stick. There is no universal convention. Some adopt the Hungarian convention for the brackets, what is the other one I dont have idea. A LazyFoo article on writing readable code and an article on coding style for Inkscape project are starters.
properly indent code
give descriptive names to the variables
Develop a naming standard
Properly comment your code
refactoring (not sure what that means… however most of the Inkscape legacy code is undergoing refactoring)
any good references for writing code?
Compiling a C/C++ program
Compiling can be as simple as executing the command
g++ helloWorld.cpp -o helloWorld
or as difficult as compiling various source files, linking various static and dynamic libraries. It is one of the important component of program development. These tutorials provide hands on experience with compiling C++ programs.
As a concrete example, I was successful in configuring the MingW compiler of Codeblocks IDE to use SDL2 library by following the [GRHMedia blog post] listed in the SDL’s Tutorial Wiki as a video tutorial.