Tutorial recommendation

Hey, guys! New here. I come from the world of competitive programming and web development. The programming language I know best is JavaScript, and I'd like to learn some more C++.
Here are some things I've made by now in JavaScript:
1. A PacMan game playable on smartphones.
http://flatassembler.000webhostapp.com/pacman.php
2. A web-app that converts arithmetic expressions to i486-compatible assembly.
http://flatassembler.000webhostapp.com/compiler.html
I think this was enough to get a general idea. So, which C++ tutorials would you recommend me so that I can rewrite those things in C++?
Last edited on
How C++ programs are made (do NOT skip this; so many C++ programmers never learn this and they waste hours and sometimes literal days of their lives on non-problems because they don't understand what they're doing):
https://www.daniweb.com/programming/software-development/tutorials/466177/understanding-c-from-source-to-binaries

Basics of C++:
http://www.cplusplus.com/doc/

Graphics & simple input:
http://lazyfoo.net/tutorials/SDL/

Expect it to take longer and be harder.
Last edited on
OK, now, I know some little OpenGL. After about a week of intensive learning I was able to make a rotating tetrahedron casting a shadow. I don't think it was worth the effort at all.
So, SDL is, based on what I've read, some kind of a cross-platform wrap-around around OpenGL (and similar libraries) plus some low-level access to keyboard, mouse and the sound devices. That's not at all what I want. Just because I am ready to make an arithmetic expression to i486-compatible assembly converter, that doesn't mean I am ready to work in anything assembly-like.
Isn't there something like, you know, SVG for C++? Here is a sample of what SVG looks like in JavaScript (from the PacMan game):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
            function drawLine(x1, x2, y1, y2)
            {
                var line = document.createElementNS(svgNS, "line");
                line.setAttribute("x1", x1);
                line.setAttribute("x2", x2);
                line.setAttribute("y1", y1);
                line.setAttribute("y2", y2);
                line.setAttribute("stroke-width", 3);
                line.setAttribute("stroke", "lightBlue");
                background.appendChild(line);
            }
            /*. . .*/
                var mouth = document.createElementNS(svgNS, "polygon");
                mouth.setAttribute("points", "0,0 10,-10 10,10");
                mouth.setAttribute("fill", "black");
                mouth.setAttribute("id", "mouth");
                mouth.setAttribute("transform", "translate(" + (px * 20 + 10) + " " + (py * 20 + 10) + ")");
          /*. . .*/
                background.appendChild(mouth);

And I am also pretty sure you wouldn't use anything like OpenGL or SDL to create a simple GUI like one in the arithmetic expression to assembly converter. Which framework would you use?
Look, I am sorry if I am being harsh, but I've been through this "Real programmers use X (a supposedly powerful framework in which it is hard to do even the most basic things)." before. I am sick and tired of putting a lot of effort learning things and seeing no results.
Where do you want to run your apps ?
Does it absolutely have to be C++ ?
I don't have any particular platform in mind. C++ appears, at least to me, to be a better language for writing algorithms in, primarily because of the STL. In JavaScript, for example, if you want to use a set, you need to create your own binary-search tree, and that's not easy. JavaScript provides some basic built-in support for maps (called dictionaries), but, without the iterators, it's almost useless. Not to mention JavaScript having no equivalent of string streams, or even "sprintf" and "sscanf".
Might be worth to have a look into Qt.
This should do for a pacman style game but also for a GUI like your 2. example
https://www.qt.io/
closed account (E0p9LyTq)
@UniverseIsASimulation,

Here's a couple of C++ tutorial websites
http://www.tutorialspoint.com/cplusplus/index.htm
http://www.learncpp.com/

There is a decent tutorial section here at cpluspplus, if a bit outdated:
http://www.cplusplus.com/doc/tutorial/

If learning from books works for you (you should get several):
https://isocpp.org/wiki/faq/how-to-learn-cpp#buy-several-books
Might be worth to have a look into Qt.

Sounds like an interesting thing. Especially since it allows me to combine JavaScript with C++ while creating the UI. I'll look into it. Thanks!
Anyway, is there something like JQuery for C++? You know, a framework that would allow you to make a flashcard game like this in around 2000 lines of code (as it takes in JavaScript using the JQuery framework)?
http://flatassembler.000webhostapp.com/etymologist.html
Last edited on
OK, I get it. I am asking wrong questions.
Anyway, is there something like JQuery for C++?


Only about a million frameworks and libraries doing pretty much anything you can think of.
closed account (E0p9LyTq)
OK, I get it. I am asking wrong questions.

No, just not asking in a better place. Internet searches work wonders.

"jquery to c++" search
https://duckduckgo.com/?q=jquery+to+c%2B%2B&t=ffsb&ia=qa

And as Repeater said, look and you will find frameworks and libraries to do what you want.
Last edited on
Topic archived. No new replies allowed.