Game programming

Moderators: None (Apply to moderate this forum)
Number of threads: 2070
Number of posts: 5361

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Re: Games and AI, and maybe some other stuff Posted by Xotor on 14 Jul 1999 at 8:05 PM
: The First program I am making generates a four digit random string and I try to guess it, while it tells me how well I am doing...I can't seem to find a cpp equivilent to chr$() BASIC function... I tried programming one too, but it's not working.... Again, any help would be appreciated...<p>
Well you'll need to remember that the char variable type is also just a number. Thus you generate a random sequence of letters by making your random number generator generate a number from 1 to 26 and add it to 64. This will produce an ASCII character (a letter).<p>
Good luck.<p>
-Xotor-<p>



Thread Tree
Beamer Games and AI, and maybe some other stuff on 14 Jul 1999 at 4:26 PM
Xotor Re: Games and AI, and maybe some other stuff on 14 Jul 1999 at 8:05 PM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.