trying to debug this code, using gbd online complier it saysmain.cpp: In function ‘int main()’: main.cpp:43:17: error: ‘strlwr’was not declared in this scope strlwr(printline); , how do I fix it.
#include <iostream>
#include <fstream>
#include <string.h>
#include<ctype.h>
#include <stdio.h>
using namespace std;
bool isPalindrome(char str[]) {
// Start from leftmost and rightmost corners of str
int l = 0;
int h = strlen(str) – 1;
// Keep comparing characters while they are same
while (h > l) {
if (str[l++] != str[h–]) {
//printf(“%s is Not Palindrome”, str);
return false;
}
}
return true;
}
int main(){
fstream outfile,file; //object of fstream class
file.open(“words.txt”,ios::in);
if(!file){
cout<<“Error in opening file!!!”<<endl;
return 0;
}
outfile.open(“palindroms.txt”,ios::out);
if(!outfile)
{
cout<<“Error in creating file!!!”<<endl;
return 0;
}
//read untill end of file is not found. and