Original Post
Ok I have this...
struct TempBone
{
int link;
int name;
char* mapper;
};
void CreateStuff(char* Filename)
{
char* Name;
ifstream input;
input.open(Filename);
if (input.is_open())
{
string temp="SOF";
input >> temp;
Name=(char*)temp.c_str();//Correctly set
vector List;
TempBone tempar;
while (temp != "EOF") //This works
{
input >> temp;
tempar.mapper=(char*)temp.c_str();//Correctly set
input >> tempar.name;
input >> tempar.link;
if (temp!="EOF") //This always returns true for some reason... I have also tried this as, if (tempar.mapper!="EOF") but it had the same responce.
List.push_back(tempar);
}
... Processing. I learned that no matter what I have done there is still a item in the List Array that has EOF as its .mapper var.
}
why in the world would this not work correctly, do char*'s and string's not support the != operator or something??
is any one else as confused as I am.
here is what I have tried
1. changeing to if (tempar.mapper!="EOF")
2. rebuilding the Project from scratch
3. I also tried to remove it after it is added but that has no effect on the problem either!?!?!?
any ideas or solutions out there?
[edited by - Xero-X2 on November 29, 2002 3:07:21 AM]