ifstream inputfile;
cout << "enter the name of the file: ";
cin >> filename;
inputfile.open(filename);
string temp;
int i = 0;
while(filename != NULL)
{
while(isalpha(filename))
{
temp[i++] = filename;
}
if(i > 0)
{
insert(temp, 1);
i = 0;
}
}
this is my code, what am I doing wrong?
I'm creating a linked list(not a part of the question asked), I'm inserting all the words from a file into the list.
am I extracting the word the wrong way? someone please show me the light :)