This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to use MSVC++ random in gcc 3.2.2?
- From: "Jim Christiansen" <christiansen_j at hotmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 01 May 2003 12:28:39 -0600
- Subject: How to use MSVC++ random in gcc 3.2.2?
- Bcc:
Hello,
I think that this may be the last question for a couple of weeks...
What should I do to utilize teaching material using references to random?
This is from Lawerneceville Press for grade 11 introductory programming
using MSC++ v6. I'm trying to move all of our computers to Linux, and I'm
finding small probelms such as iostream vs iostream.h ... Maybe random will
be the last of my problems for this simple progamming.
<snip>
#include <iostream.h>
#include <conio.h>
#include <lvp\random.h>
int main()
{
randomize();
cout << "Doodler! Press I/J/K/M to move, Q to quit" << endl;
char KeyPressed; // Key pressed by user
int x=40; // Establish initial position of cursor
int y=10;
char Character = '*'; // Initial char that is displayed
do {
// Plot a "point"
gotoxy(x, y);
cout << Character;
gotoxy(x, y); // Move blinking cursor under current spot
<snip>
Thank you,
Jim
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail