I keep getting an error saying " error: no matching function for call to 'getline(std::ifstream&, char [100])'| " on getline(Input, sentence). I might be missing something, Im not sure. What I'm trying to do is read an entire line from the input and insert it into char sentence[100] using getline. I have to use getline per the requirements for the assignment. Thank you in advance.
char uniqueWords[100][16] = {""};
int multipleWords = 0;
int theWords[100];
int totalWords = 0;
char sentence[100];
char delimit[] = " /.";
ifstream Input;
Input.open("input.txt");
if (!Input.is_open())
{
cout << "Error Opening File";
exit(EXIT_FAILURE);
}
ofstream Output;
Output.open("output.txt", std::ios_base::app);
if (!Output.is_open())
{
cout << "Error Opening File";
exit(EXIT_FAILURE);
}
char *p;
while(!Input.eof())
{
getline(Input, sentence);
p = strtok(sentence, delimit);
while(p)
{
Output << p ;
words(p, uniqueWords, theWords, multipleWords); // a function for the assignment
totalWords++;
p = strtok(nullptr,delimit);
}
create << "." << endl;
}