1. matsp you NEVER fail me! Thank you! That was really helpful!

2. Although after a "beginners" book, there are lots of advanced books out there.
Then there are design books and such. You can never learn enough.

3. O0O
But you see actually the reason I'm trying to learn so much is because theres a small group(really small group) of people in my class who know ALOT more than what we are currently learning and I want to be able to do stuff like they do(adding pictures, etc, etc) but I'm not sure what exactly to learn. Currently all I know are...

-Cin(.ignore,.get,etc),

-Cout,

-Loops,

-If, Else if,

-Arrays(2D and onward),

mostly the really basic stuff

-A little on File I/O(indata, outdata, etc),

-Structs,

-Classes(though I'm not really good at it) no inheritance though,

Pointers(but I NEVER use them except during practicals ON vectors because I don't see why I would need them)

AND THEN I am currently trying to learn...

-Vectors(because they are cool)

-Iterators(because they came along with vectors and just like pointers, I don't really see the need for them, am I like pointer-blind? O_O)

-Algorithm

-Maps(but I only know how to declare them)

-How to make simple games!(I'm trying to do English Chess xD, good idea?)

Yeah, I think that's just about it.

4. How to make simple games!(I'm trying to do English Chess xD, good idea?)
Chess AI is a science of its own, but a simple interface for two human player games (that can detect correctness of moves, draw and win conditions, do game timing, perhaps replays after the game is over, taking moves back etc) should be quite doable at some point.

Somewhere quite early you should be able to write a Guess a number game (could be both ways, human guessing a computer-picked number and the other way round).

Then perhaps a Hangman game.

Tic-Tac-Toe is popular too, but complete beginners tend to implement it in awful ways (there are examples of the game written without any arrays or loops at all ), so that might be an intermediate level challenge.

Of simple graphical games, Pong, Tetris, Breakout and similar are popular choices.

Pointers(but I NEVER use them except during practicals ON vectors because I don't see why I would need them)
I don't quite understand this sentence, but storing pointers in a vector, or storing pointers to vector items are not very good ideas.

5. Storing pointers in a vector is usually a good solution, though, when you don't want data copied needlessly.

6. Originally Posted by Elysia
Storing pointers in a vector is usually a good solution, though, when you don't want data copied needlessly.
Then use a shared pointer implementation like the one boost has. Raw pointers in a vector is never a good idea because you have to manage memory explicitly.

7. Or use a special-purpose container, such as boost::ptr_vector.

When you store pointer to dynamically allocated objects in a regular vector, not only is it your responsibility to free the memory yourself, but also certain functions become unusable (such as std::remove).

Basically you'd be potentially required to write much more explicit memory handling code than just releasing the memory at the end.

In addition, it won't be exception safe.

8. Naturally. I never leave home without smart pointers these days!
Of course, a smart pointer is technically still a pointer, so the argument still holds

9. Originally Posted by anon
Chess AI is a science of its own, but a simple interface for two human player games (that can detect correctness of moves, draw and win conditions, do game timing, perhaps replays after the game is over, taking moves back etc) should be quite doable at some point.
Yep, my teacher showed us this video where this supercomputer beat this professional at chess.

Somewhere quite early you should be able to write a Guess a number game (could be both ways, human guessing a computer-picked number and the other way round).
Yep, had to do it in one of my practicals, though still quite unclear about the effects of srand(time(NULL)).

Then perhaps a Hangman game.

Tic-Tac-Toe is popular too, but complete beginners tend to implement it in awful ways (there are examples of the game written without any arrays or loops at all ), so that might be an intermediate level challenge.
Cool! I have a book which uses these two games as an example.

Of simple graphical games, Pong, Tetris, Breakout and similar are popular choices.

I don't quite understand this sentence, but storing pointers in a vector, or storing pointers to vector items are not very good ideas.
Thanks for the great ideas, same for everyone else. xD But I guess it'll be some time before I start using pointers instinctively like while loops.

Popular pages Recent additions