I wrote a C++ program using codeblocks and at the last minute I decided to use empress, the server at school that we use to do our labs, and turns out that it did not work! What does that mean? Is my program not right? Or could it be a compiler issue? I normally use linux ubuntu using codeblocks to do my programming. I tested the program using windows and it also worked. Why doesn't it run on the server?
Here is the code that I think causes the problem:
bool dictionary::insertWordsIntoDict(string fileName)
{
ifstream inp;
string word;
vector<string> vec;
inp.open(fileName.data());
if(inp.good())
{
while(!inp.eof())
{
inp>>word;
vec.push_back(word);
}
string temp;
string temp2= "#.txt";
for(int i=0 ; i<vec.size() ; i++)
{
temp = vec[i];
temp2[0] = tolower(temp[0]);
cout<<temp<<endl;
AddWord(temp.data(), temp2);
}
}//end of if statement
else
{
cout<<":( File does not exist! "<<endl;
return failure;
}
}// end of function insert words