Hello! I have an assignment in my "intro to programming class" and I am having trouble just getting started.
We are suppose to take a txt file that has several lines of text - and create a program using "fin" to test each line to determine if it is a palindrome or not.
So far I have only the very beginning....here is my code
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
ifstream fin;
fin.open("palindromes.txt");
if (!fin.good ()) throw "I/O error";
return 0;
}
I have no idea how to create a loop that will check for palindromes. Can someone give me pointers on how to get started in order to do that?
Thank you,
confused!