38
perotti
6y

dev

Learning C++ from God himself (stroutstrup's book)

Am hella confused how it works still

Comments
  • 0
  • 3
    What helped me finally grasp how pointers work was writing an implementation of a linked list. Then it finally clicked for me, so my advice would be to write something functional that need/uses pointers.
  • 2
    @Pavr what confuses me is the implementation of classes in STL. What I find hardest to grasp is separation of algorithms from data structures, which doesn't happen when you are working with business logic models; thus making this piece of code confusing as fuck to me.
    Also: streams.
    Also: JS and python background.
  • 0
    @teganburns the point is to discover all the facets there are to c++ not make it 100% optimized. Keyword here "learning"
    Thanks for the heads-up though
  • 0
    @teganburns Since you replied, I take you are most capable of reading. Though I should refrain from asserting it to be true, kiss[3].
  • 1
    I would suggest making a small project with C++, like a mini game or a raytracer. That really helps solidify concepts. Also read a lot of C++ code to see how others use it.

    This might help: http://lazyfoo.net/tutorials/SDL/

    The problem is that C++ is basically three languages in one: the C-style base with pointers and stuff, the object oriented part, and templates. Learning it in that order is a good thing because it's sorted by increasing complexity (no point doing template metaprogramming if you don't get method overriding or something).
    Also, as @teganburns said, C++ can have hideously complicated ways of doing simple stuff. There's usually a much better way.
  • 0
  • 0
    @RememberMe You now are a VIP to my heart
  • 0
    If u r a beginner then I would recommend you to refrain learning STL as of now. Try learning basic syntax and basic oops concepts.
    Once you master the syntax and oops u can easily switch to STL
    ATB 👍
  • 3
    Don't learn C++ from TC++PL. It's not Bjarne's book for learning C++. It's meant to be a reference guide for people who already have a hold on C++. Instead, read his "Programming: Principles and Practice Using C++".
  • 0
    @tiberius1900 Will do my doggie
  • 0
    @millido Terminus (default Ubuntu tty font)
  • 0
    C++ syntax is the fugliest I've ever seen.

    How can someone enjoy programming in such a horrible- looking language.
  • 0
    @Chlodovechus funny thing about languages with rigid and elaborate syntax - it makes the code much easier to read. Say, take the "ugly" C++ and Erlang, vs. the "beautiful" Haskell and Python. I've dealt with large, well written codebases in all four languages, and I felt that C++ and Erlang code was much, much easier to read. All the extra dots and commas and semicolons really help increasing readability.
    Note: I love all four languages. And their respective syntax.
  • 0
    The book that really helped me grasp pointers was the "C Puzzle book"
    https://books.google.co.in/books/...
Add Comment