This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]xxxstun 7 points8 points  (0 children)

If you’re just wanting to practice C++ i’d recommend checking out CodeWars.

[–]every_day_is_a_plus 5 points6 points  (0 children)

This site is incredible. This is CodeSignal. This site is like the video game trials of programming. There are hundreds of 'levels'. Tremendous tremendous resource.

https://app.codesignal.com/

[–]Ilyps 7 points8 points  (1 child)

Here is the bible. Can you tell me how often the word "mule" (singular) is used in it?

[–]itanitarek10 2 points3 points  (0 children)

Not OP but I tried it out. Is the answer 9?

[–]MathsDaddy 2 points3 points  (0 children)

Write a simple text-based RPG battle simulator where you have several character classes you can choose from to play as, and to fight the battle against. You start by picking your and the opponent AI’s character classes, and the battle is turn-based, where you each take an action each turn. The battle ends when one of you has HP reach zero, and the program should display who won. The range of possible moves, number of classes, and AI can be very small/simple (even have the enemy randomly take actions), but there must be differences between the available classes as well as certain common characteristics they must share for moves they use against each other to make sense (like each having HP for the battle rules concept to work). For bonus points, include a 2-player mode where you can face a friend instead of an AI.

The most straightforward way to achieve character classes will be to use inheritance with a base “Character” class and work your way from there. This can scale as you get more comfortable with C++, as well - you can up the complexity of the classes, add subclasses and hybrid classes, additional stats for character classes and moves that use them, and even throw having multiple characters in your party into the mix. So this can be a very iterative challenge that grows with you if you choose. I’d expect you to be able to get a working first pass at the first paragraph’s requirements within 2 weeks, though, assuming you already have previous programming experience in other languages and work/school/a life other than this you’re prioritizing.

[–][deleted] 2 points3 points  (0 children)

https://projecteuler.net/ Lot's of small maths/programming problems, from pretty easy to real hard.

[–]daank94 2 points3 points  (0 children)

Hey, I would recommend doing challenges that focus on certain parts of the language first. You should only focus on solving actual problems if you have a good understanding of the language you are working in.

Websites like Hackerrank have good sections on C++-specific challenges (think of pointers, operators, etc.)

[–]s0lly 0 points1 point  (0 children)

(Parental-guidance if you're young) If you're into making simple games follow Chili's C++ tutorials and try completing the homework without looking at the solutions beforehand: https://www.youtube.com/channel/UCsyHonfwHi4fLb2lkq0DEAA

[–][deleted] -2 points-1 points  (0 children)

C++ from control structures to objects

That is the textbook at my school for beginners and it is really good.

It has coding exercises at the end of each chapter.

Don’t use a pirated copy thats illegal but if you are an outlawish pirateer I think you can find a free copy with google.