|
From: Bob W. <bo...@ph...> - 2002-04-17 12:01:21
|
Daniel;
when you enumerate variables, is the first one (by default) 0 or 1 ?
Run this little program and you will get your answer.
#include <iostream.h>
#include <conio_mingw.h>
#include <stdio.h>
// #include <windows.h>
// #include <stdlib.h>
// #include <time.h>
enum {Dog,Cat,Horse,Pig};
int main (int argc, char *argv[])
{
int i;
for (i =3D Dog; i <=3D Pig; i++)
std::cout << "i =3D " << i << std::endl;
std::cout << "\n\nHit any key to close window . . .";
while (!kbhit());
return 0;
}
|