I've just wrote this program and when i compile, there is an error at the red color fonts.
Can i know what's the error?
thank you.
char quest;
char words[50];
int count;
int z;
ofstream file;
file.open("WORDS.txt" , ios::app);
file.close();
cin.ignore(50,'\n');
cout << "\n\n Please enter the word that need to be deleted: ";
cin.getline(words,50,'\n');
for (int i=0; i<strlen(words); i++)
{
words= tolower(words);
z = count + 5;
}
for (i=0; i < count; i++)
{
if ( strcmp( words,words) == 0 )
z = i;
}
if (z<count)
{
ofstream file;
file.open("WORDS.txt", ios::app);
for ( i=0; i < count; i++)
{
if ( i!=z )
cout << words << endl;
}
system("del words.txt");
system("ren words.txt words.txt");
}