I've read through some tutorials and have a pretty firm grasp on the basic concepts.(The tutorials on this site). I'm liking it so far, but they don't have any "why don't you try making this project?". I duplicate the example source codes and put a twist on it, but nothing fancy. Right now I'm up to arrays and using them as parameters, so does anyone have any straight-forward, but long, mini projects that combine a lot of different material?
I could look into it, but before hand, does it require know about header files and resource files? I don't know anything about those. But yea,I"ll give it a shot, thanks. I'm just trying to trying to get some basics down until the book I bought arrives(C++ primer plus).
Console Application - Ask the user to enter a bunch of words, as many as they want until they enter 0. After this, count how many times each letter appears across all the worlds, and print out a list of each letter and how many times it appears. This should be case insensitive.
Enter World > hello
Enter World > lemon
Enter Word > goodbye
Enter Word > 0
Letter: h appears 1 time(s)
Letter: e appears 3 time(s)
Letter: l appears 3 times
Letter: o appears 3 times
I might suggest as a learning path the following topics (in this order):
0. References vs. pointers / const vs. non-const and when to use each
1. Defining classes
a. Constructors, default constructors, copy constructors, and the
b. Writing operator functions (operator==, etc)
c. Writing streaming operators (operator<< in particular)
2. Inheritance (just public, non-virtual at this point)
3. Overloaded functions and virtual functions
4. Basic templates
5. STL containers (vector, list, deque, and map) and STL strings
6. Exceptions (try/catch keywords)
Pick a project that is simple but easily extended. Implement the simple version and add features later. For example, make a game that plays blackjack against a human. Make the computer the dealer, and use
simple logic for the dealer (always hits <= 16, stands otherwise).
Then add functionality to keep track of many times the computer wins and how many times the player wins.
Then make a game that plays 5-card draw poker against a human. Make the computer logic simple. The point isn't to make the computer the best poker player in the world. Provide functions to sort the player's hand either by value or by suit, and allow the user to say which they prefer.
Then, combine the two games into a single program that presents the user with a menu of games to play and then plays the game requested. You should have quite a bit of common code that you can reuse between the two.
Then add more features to the program. Let the user enter their name so that you can keep track of their wins and losses by writing information to a file and reading it back in. Then add a "high score" table that displays all the human players in the file in order from highest winning percentage to lowest.
Implement other versions of poker in the same program. And so forth.
You might start by keeping track of the player's cards with an array. As you become more comfortable, try using a vector<> instead. You might start by using character arrays to hold players' names. Later, switch to strings.
Thanks for that! I actually copied your post down to notepad. But after reading over some things, I'm pretty certain that I need a lot more concept work because everything I am going by is from the tutorial on the site, which gives you a nice overview, but nothing very in-depth. Hopefully C++ primer plus will fill that in! A little off topic, but has anyone read it? From what I saw, it generally had stellar reviews.
I think the first semi complex beyond basics program i wrote was tic-tac-toe in the console. You can actually write one very simply without the use of classes references or overloading. But then as you're learning those concepts start implementing them in and realize how they make life quite a bit simpler.
Later on you could add graphics, networking, ai (from brute force to neural network, to a combo of genetic neural networks). Later on add 3d for cubic tic-tac-toe and for giggles, make a 3d game using characters in the consol.
helow guyzz.. Can some one help me to understand more devc++..I'm actually a beginner of this language. I have browsed some related tutorials but I think I need some elaboration from other people.. Thanks guyzz and hoping somebody will respond to this.. I more appreciate it if you send it on may Email Add firstname.lastname@example.org....because for this time I don't have enough time to browse internet and my computer not yet connected to internet...God speed