Hey! Do anyone have some fun projects?

closed account (iGLbpfjN)
https://projecteuler.net/
https://en.wikibooks.org/wiki/C%2B%2B_Programming/Exercises
http://www.cplusplus.com/forum/articles/12974/
http://www.cplusplus.com/forum/beginner/75558/
Or try finding a C++ book. Most of them have exercises at the end of each chapter.
Last edited on
You should do suggestions like this in a public forum. If other beginners come across this thread, they can use the suggestions given as well, and the suggestions you give have a further-reaching impact. Giving suggestions over PM only serves to hide information that would be useful to anyone looking up something relevant to the topic of this post.
I remember when I first started I made a program to do some maths homework for me.
Study the following concepts and topics
1. Control / Conditional Structures - if, if else, switch
2. Repetition Structure - while, for, do-while
3. array , 2D array
4. User-defined Functions

Create a command prompt Tic-Tac-Toe game. Game should print the playing board like this.
1
2
3
4
5
6
7
8
   1   2   3

1  X | O | X
   ---------
2  O | X | O
   ---------
3  X | O | X


Then, you will program the game for 2 human players (Programming computer AI may be a bit difficult for you at the moment).

You will prompt them to enter their names first and then the marker they would like to use. If the first player chooses X, then the second player should accept O by default and vice versa.

The board will be blank at the start, of course. For each player turn, you will ask them to enter the coordinate at which they would like to place their marker (For example, Enter "1 3" to play Row 1 Column 3). Then, you will update the board accordingly and print the board.

This will continue until a player wins or the board is completely full (This requires you to code the win condition).

At the end of the game, you will announce who the winner is or announce that the game is a draw.


EDIT: If you create this game successfully, save the code because you will modify your game as you learn more C++

Once you learn class, inheritance and operator overloading, you will create an Abstract Data Type for Board, Game, and Player. You will basically reorganize your code.

Once you learn some advanced algorithms, you will create an effective computer AI that never loses to human (They can draw).
Last edited on
Topic archived. No new replies allowed.