this chunk of code displys NOTHING why is that?
char data[50];
do
{
fin>>data;
if(data == "{title")
{
fin>>data;
cout << data << endl;
}
if(data == "{zdescription")
{
do
{
if(i == 0)
{
fin>>data;
i=1;
}
cout << data << endl;
fin>>data;
} while(data != "}zdescription");
i = 1;
}
if(data == "{exits")
{
fin>>up;
fin>>down;
fin>>north;
fin>>south;
fin>>east;
fin>>west;
cout << "Exits[ ";
if(up != 0)
cout << "-up ";
if(down != 0)
cout << "-down ";
if(north != 0)
cout << "-north ";
if(south != 0)
cout << "-south ";
if(east != 0)
cout << "-east ";
if(west != 0)
cout << "-west ";
if((up == 0) && (down == 0) && (north == 0) && (south == 0) && (east == 0) && (west == 0))
cout << "None! ";
cout << "]" << endl;
}
} while(data != "}");
This is an infinate do and i do not know why, It also does not display ANYTHING... Here is the file that it reads:
}
{title
hole of incarnation
}title
{zdescription
you are in hole surrounded by lifeless bodys, waiting to be awakend...
}zdescription
{exits
3
0
0
0
0
0
}exits
{items
}items
{mobs
}mobs
{specials
}specials
}
What is wrong here???? (I am use microsoft visual C++)