matsp you NEVER fail me! Thank you! That was really helpful!
matsp you NEVER fail me! Thank you! That was really helpful!
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.
Last edited by KgNe; 09-03-2008 at 08:12 AM. Reason: No reason really. No big difference -_-
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.How to make simple games!(I'm trying to do English Chess xD, good idea?)
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.
I don't quite understand this sentence, but storing pointers in a vector, or storing pointers to vector items are not very good ideas.Pointers(but I NEVER use them except during practicals ON vectors because I don't see why I would need them)
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
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.
Last edited by anon; 09-03-2008 at 11:58 AM.
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
Yep, my teacher showed us this video where this supercomputer beat this professional at chess.
Yep, had to do it in one of my practicals, though still quite unclear about the effects of srand(time(NULL)).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).
Cool! I have a book which uses these two games as an example.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.
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.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.