I want to check to see if the user added a ?
to the end of the buffer. If not, I want the program to add one automatically. This is what I have so far. I dont know what to do next.
First I check to see if the buffer is not blank.
Then, if the last item is not a ?
, add the question mark automatically to the buffer and then copy the content to the current data node.
if ( strlen(buffer) != 0)
{
if (buffer[strlen(buffer)-1] != '?')
{
//what do i put here to add the ? if theres non?
}
strcpy(current->data,buffer);
}