-
Problem with cin
Hiya people!
I'm quite newbie to C++ but i know the really basic basics.
A couple of days ago i tried making a small RPG game just for the fun of it.
I started making a small character creator which consisted of a few couts and a couple of cins.
I was overwhelmed by happiness when there were no error messages.
But when i tested it i could only write in the first of the cins then the program skipped the rest of them.
Why?
-
You can make a small RPG with just some simple C++ stuff? Cool! ;)
-
Here's a quick rewrite.....
I have simplified much of it, moved the variable declarations to the top (as none of them are conditionals), changed charectors into strings, added a strcmp() function to test if a string is "yes", changed the if logic to switch cases and added contine and break statements to control the program flow a little better.
It still isnt the best RPG in the world (:)), but it may give you a few ideas on where you were falling down
-
Yay thanks man =D
I haven't come to that level of programming yet but i'll review it with some help from my C++ book and perhaps i'll get some understanding vibes...
Big thanks to you!
Now the only question that remains is which company to send this RPG to when its done.... maybe like....Square Soft Inc......;)