Best resources to learn C++ (free)

  • #1

Main Question or Discussion Point

Hi,
I'm currently trying to learn the C++ programming language to build my apps in my off time. I already have Code Blocks with WXWidgets installed also. I recently heard of firecode.io. I'm looking for more resources like that ideally to learn software development (C++).
 

Answers and Replies

  • #3
11,827
5,450
Also rosettacode.org is a good site for comparative study between languages.
 
  • Like
Likes sysprog and QuantumQuest
  • #4
pbuk
Science Advisor
Gold Member
1,457
437
I think that a good way to get into C++ is to play with an Arduino kit.

Edit: just re-read the title, an Arduino kit is not free, sorry.
 
Last edited:
  • #5
QuantumQuest
Science Advisor
Insights Author
Gold Member
926
485
Hi,
I'm currently trying to learn the C++ programming language to build my apps in my off time. I already have Code Blocks with WXWidgets installed also. I recently heard of firecode.io. I'm looking for more resources like that ideally to learn software development (C++).
One very essential thing is where you are now in programming. For an absolute beginner, C++ can quickly become a real nightmare when it comes to real world programming. It has a number of subtle, excessively wide in scope and cumbersome features which are part of its real power. If you already know some other imperative and / or OO programming language sufficiently enough or if you already know the basics of C++ or you're at an intermediate level at C, things are way easier.

This is by no means a discouraging statement: it just means that if you want to learn C++ from the ground up with no prior programming experience, it's best to base your study and practicing - at least up to intermediate level, on a good book which you must follow closely and systematically. There is a number of good books you can find. I would recommend Deitel's "C++ How to Program" - I've extensively used Deitel's books and resources and I can tell that they are among the best. Keep in mind that although there is a number of good tutorials on the net, a tutorial can never be a substitute for a good book no matter how good is it.

A very essential thing is also studying algorithms and data structures. I really cannot stress out by words the real value of this.

If you want to get into the software development world you'll also need - besides great patience, to learn about the practical aspects you'll need and the tools of the trade. Code::Blocks is given as a top choice in many sites and for good reason. Personally, I've worked with a number of IDEs through the years - my main choice is Eclipse . I also second @BvU for DevC++. I have used extensively 4.9.9.2 version in the past (now abandoned) but there is a 2016 fork named Orwell DevC++ which you can give a try if you wish.

A last thing I want to refer to is in acquiring good programming habits i.e. commenting appropriately, beautifying, documenting, testing code and reading others code in order to edit and develop your own ideas - not copy-pasting. For this last thing, I would regard as a very useful thing to study code from github.io.
 
Last edited:
  • Like
Likes BvU
  • #6
1,430
1,270
I find the tutorials at w3schools useful at times. The C++ tutorial is available here:
https://www.w3schools.com/cpp/default.aspThere is one very good book; it is worth spending on or borrowing from a library:

C++ - The Complete Reference by Herbert Schildt.

I learnt Java from this person's other book, and I must say it was one of the best books for beginners. Even now, after more than four years of programming in Java, I have to refer to it sometimes while developing GUI (I am not much into GUI usually).
 
  • Like
Likes Greg Bernhardt and jedishrfu
  • #7
5
0
While I learned C++ in a classroom setting, as Wrichik mentioned, w3schools is a great reference for lots of different programming languages. The lessons are simple and there are little quizzes to help you make sure you are understanding the info correctly. While I didn't necessarily use it for C++, it's been a great help for understanding languages
 
  • #8
33,646
5,315
C++ - The Complete Reference by Herbert Schildt.
There are many negative reviews for Herb Schildt's C++ book. When you recommended this book in a post in the Textbooks section, I said this (https://www.physicsforums.com/threads/best-book-to-learn-c.903157/post-5794455)
There is quite a lot of serious criticism of this book by Schildt.

Although most of the 52 people who reviewed this book gave it high marks, quite a few really panned it. Here are some of the critical comments, taken from the Amazon page on reviews of this book.
From Wikipedia:-------------
Schildt's books have a reputation for being written in a clear style, at least at first glance. Their technical accuracy has been challenged by reviewers, including ISO C committee members Peter Seebach and Clive Feather, Steve Summit, author of the C FAQ, and numerous reviews in C Vu from the ACCU.
I recommend you do not use any Herbert Schildt book to learn or reference the C programming language. Instead, I suggest you go straight to the source and use "The C Programming Language" (Second Edition) by Kernighan and Ritchie, aka "K&R".

Also highly recommended by competent programmers are "C: A Reference Manual" by Harbison and Steele, and "C Programming: A Modern Approach" by K.N. King. All of these are good books for beginning C programmers.
Schildt makes numerous errors.
One example:
printf("%f", sizeof f);
Clearly wrong: sizeof f has does not have type double.
Another example:
/* Write 6 integers to a disk file. */
void put_rec(int rec[6], FILE *fp)
{
int len;
len = fwrite(rec, sizeof rec, 1, fp);
if (len != 1) printf("write error");
}
Wrong again; rec is converted to a pointer to int, rather than an array of 6 ints, because it is in the parameter of a function (try it if you don't believe me).
After purchasing three books written by Herbert Schildt, I have to conclude that I am not a fan of this authors' work. While his efforts yield a lot of information, often the book is heavily unorganized and suffers from absence of often basic-yet-critical information.
 
  • #9
wle
311
137
I find the tutorials at w3schools useful at times. The C++ tutorial is available here:
https://www.w3schools.com/cpp/default.aspThere is one very good book; it is worth spending on or borrowing from a library:

C++ - The Complete Reference by Herbert Schildt.

I learnt Java from this person's other book, and I must say it was one of the best books for beginners. Even now, after more than four years of programming in Java, I have to refer to it sometimes while developing GUI (I am not much into GUI usually).
Herbert Schildt's books have a bad reputation among people knowledgeable about C and C++. The 'bullshildt' is named after him.
Jargon File said:
bullschildt: /bul´shilt/, n.

[comp.lang.c on USENET] A confident, but incorrect, statement about a programming language. This immortalizes a very bad book about C, Herbert Schildt's C - The Complete Reference. One reviewer commented "The naive errors in this book would be embarrassing even in a programming assignment turned in by a computer science college sophomore."​
You can find negative expert reviews of Schildt's books on the ACCU (Association of C and C++ Users) website. The USENET alt.comp.lang.learn.c-c++ FAQ (scroll down to question 16) also strongly recommends against learning from Schildt's books.

If you're wondering what's wrong with the specific C book cited by the Jargon File entry quoted above, see C: The Complete Nonsense by Peter Seebach.
 
Last edited:
  • #10
DEvens
Education Advisor
Gold Member
1,203
452
It's a little off topic, since the original post specified free. And it's a bit of an old thread. But, anyway...

When you have learned a bit of C++ and you are feeling your strength a bit, consider starting to learn to do it well, instead of just vigorously.

Koenig and Moo _Accelerated C++_ gives good advice on how to use C++ in the way it was meant to be.
https://www.amazon.com/dp/020170353X/?tag=pfamazon01-20&tag=pfamazon01-20

McConnel _Code Complete_ gives general advice on programming well. Though it is not just for C++.
https://www.amazon.com/dp/0735619670/?tag=pfamazon01-20&tag=pfamazon01-20
 
  • Like
Likes sysprog and jedishrfu

Related Threads on Best resources to learn C++ (free)

  • Last Post
Replies
24
Views
6K
Replies
6
Views
3K
Replies
17
Views
2K
Replies
6
Views
1K
Replies
5
Views
4K
  • Last Post
Replies
2
Views
11K
Replies
2
Views
408
Replies
7
Views
11K
Top