00:00
00:00
Newgrounds Background Image Theme

Jesspionic just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Where do I start learning C++?

1,258 Views | 9 Replies
New Topic Respond to this Topic

I only know how to set up a compiler and about and how to use some basic commands such as cin, cout, int, double, float, for, while, do while, if, else and maybe a few more that I forgot to mention. I want to learn it good enough to be able to graduate since I'd rather pick programming than physics, chemistry or biology, at least this thing might prove useful in the future. I can't afford the time to master it and don't intend to make myself a career on it. Where do I learn? Are there any good series on how to create practical stuff with it so it is easier to learn? any series on specific formulas? I know about a site called cplusplus, but everything is very confusing there and doesn't really tell me what stuff does, or at least I don't know C++ good enough yet to be able to read that stuff.


Also I have to urgently learn about stacks or i'm dead lol.


I do 3D art and stuff idk

BBS Signature

Response to Where do I start learning C++? 2020-10-22 14:14:18


I personally would recommend you The Cherno as a starting point for learing C++. He covers a lot of the basics of C++ on his C++ Series, and -more importantly- he explain how the stuff you put on the screen actually works.

Response to Where do I start learning C++? 2020-10-25 01:53:53


At 10/22/20 02:14 PM, KMiles wrote: I personally would recommend you The Cherno as a starting point for learing C++. He covers a lot of the basics of C++ on his C++ Series, and -more importantly- he explain how the stuff you put on the screen actually works.


Ohh, I was actually already following the guy. I did fall asleep after a first video but I got serious after that and I've learnt some stuff.


I do 3D art and stuff idk

BBS Signature

You can Google C++ resources pretty easily. A good idea might be to figure out a few things you want/need to learn and try making a program that covers one or more of the topics you're looking at.


Here's an exercise for you that will be useful if you're learning about stacks: Write a program that will tell you if the brackets of a string are closed correctly. Here are some examples of correct and incorrect inputs:


CORRECT:
( )
[ ( ) ]
< { } [ ] >
( { [ ] } )

INCORRECT:
(
[ < ] >
{ < >
( ] )

Also just a quick explanation of stacks: A stack is a lot like a physical stack of pancakes or plates. You add and remove elements from the same end, meaning that the first item you put in (the first plate you set down) will be the last one you remove, no matter how many how many or how few plates you set down on top of it.


This is really BAD if you're making independent tasks wait on each other (for instance, if you have a server with multiple clients, the first client trying to connect to a server won't get a response for a really long time,) but it can be really GOOD if certain tasks are connected to each other, or for traversing hierarchies.


For instance, suppose you're designing an action menu for a game like this:


Move
  Walk
  Sprint
Act
  Attack
    Physical
    Magic
      Offensive
        Fire
        Thunder
      Defensive
        Heal
        Revive
  Items
    Healing Potion
    Antidote

You can use a stack to keep track of where you are in the menu in order for you to be able to go back to the previous menu. If you were to traverse from the root menu to "Fire," but then changed your mind and navigated back to the root menu in reverse, what would happen?


Your collection of items will read [ root, Act, Attack, Magic, Offensive, Fire ]


If you use a queue (bad) when you go to remove an item, it will take you to root (because it was the first thing you added while traversing the menu.) Except the back button is only meant to take you back ONE menu. Worse, if you hit back twice, you end up in Act, and continuing to press the back button will take you FORWARD through your options as though it's replaying the selections you made earlier!


If you use a stack (good) you'll remove items in reverse order; from Fire, it will take you to Offensive, then Magic, etc. This is expected behavior and works because most recent items added to your stack are the ones most contextually relevant to where you are at that moment. Hopefully this gives you an idea of why a stack is good for the little bracket exercise I gave you.


If I offer to help you in a post, PM me to get it. I often forget to revisit threads.

Want 180+ free PSP games? Try these links! - Flash - Homebrew (OFW)

Response to Where do I start learning C++? 2020-10-31 06:35:30


I know you probably don't want to hear it, because it's not going to be one of those "quickly do this" type things, but if you want to learn C++ there's really no substitute to Bjarne Stroustrup's official book on the language.


If your version of that book isn't up to the newest C++ standards, then you'll need to supplement with reading material specific to the newer versions of the language, if you plan on using any newer features. You'll also want to supplement this with compiler-specific reading material of whatever C++ compiler you use.


Also, you absolutely must set up your compiler, or inform your compiler, as to which version of the language you are using, unless your compiler only understands a very old version (which then would dictate what you must use). You could have correct C++ code, but it won't compile correctly, merely because you used a different version of C++ than what your compiler was expecting, so this can be very important. Modern C++ compilers can target to many versions of the language, but the default may not be what you expect, so better to be explicit, if you find you have problems there.


Also, if you don't care to go into programming further, then I'm really not sure why you chose C++ as a first programming language. You may be better suited with Python (or some other language), as a beginner. If you do go with Python, do Python 3 and just go ahead and ignore Python 2 as it's on the way out anyway.


C++ is rather overly complex, as a language.


Whatever you choose, there will likely be a lot of reading material involved, so is definitely not one of those things you can put off to the last minute and then try to "cram" it in.


Want to play Flash games on Newgrounds again? See here

Response to Where do I start learning C++? 2020-11-06 15:22:03


look for theCherno youtube channel on youtube, it's a good start. Wish it exist when I first wrote C++ in my life. Other than that, any C++ book written by bjarne or scott meyer.

Response to Where do I start learning C++? 2020-12-29 14:41:42


At 12/29/20 07:38 AM, tehdroopy wrote: Getting familiar with a text editor is also important. I used to advocate for ed, but now I'm taking a liking to emacs because of how feature rich it is. There is also vi as an option, which is a great editor. I still like ed and have it always installed, but I'm liking the features of more advanced editors more nowadays.


it can be good practice to learn the language by using a pure text editor but ultimately you're doing yourself a disservice by using a text editor over an IDE.


BBS Signature

Response to Where do I start learning C++? 2020-12-29 18:46:36


At 12/29/20 05:43 PM, tehdroopy wrote:
At 12/29/20 02:41 PM, S3C wrote:
At 12/29/20 07:38 AM, tehdroopy wrote: Getting familiar with a text editor is also important. I used to advocate for ed, but now I'm taking a liking to emacs because of how feature rich it is. There is also vi as an option, which is a great editor. I still like ed and have it always installed, but I'm liking the features of more advanced editors more nowadays.
it can be good practice to learn the language by using a pure text editor but ultimately you're doing yourself a disservice by using a text editor over an IDE.
Emacs is practically an IDE. It's almost an operating system.


*looks up this claim*


I've never bothered to use emacs or vi. I had no idea they were this powerful! Good knowing.


BBS Signature

Response to Where do I start learning C++? 2021-05-13 05:53:44


The new boston or "bucky" for short he taught me a lot about C++ and honestly he's probably one of the best teachers I ever had in all my years look him up on youtube he also teaches everything else under the sun if you're interested in any other programming language


(Real men use the nano editor for programming)

Response to Where do I start learning C++? 2021-05-13 16:26:53


At 5/13/21 05:53 AM, Theslayer007 wrote: The new boston or "bucky" for short he taught me a lot about C++ and honestly he's probably one of the best teachers I ever had in all my years look him up on youtube he also teaches everything else under the sun if you're interested in any other programming language


Thanks for replying but I don't want to code anymore. Last summer i started trying to learn game development and i basically picked my path. I don't think I'm made for code and neither i enjoy it that much, but at least now I'm passionate about 3D art and i don't waste my time anymore just playing video games and watching anime and shit.


I don't regret trying to learn coding though since it led me where i am now.


I hope your recommendation helps whoever finds this thread in the future.


I do 3D art and stuff idk

BBS Signature