|
From: Bob W. <bo...@ph...> - 2002-04-18 13:06:45
|
MessageI've been think about this, and isn't the call to =
system("pause"); a windows specific call and as such would not be =
portable to UNIX or any other operating system?
Regards,
Bob
A more ANSI C++ compliant code would be:
#include <iostream>
#include <cstdlib>
int main ()
{
using std::cout;
using std::endl;
using std::system;
=20
enum {Dog,Cat,Horse,Pig};
int i;
=20
for (i =3D Dog; i <=3D Pig; i++)
cout << "i =3D " << i << endl;
=20
=20
system("pause");
=20
return 0;
}
=20
or check the comments i have placed in your code.
Ioannis
|