I'm supposed to read an integer n from the user, which is the followed by n words, and then what follows after that is a sequence of words and punctuation terminated by the word END. For example:
2 foo d
foo is just food without the d . END
The n words are to be "redacted" from the second line. So it would show up as:
*** is just food without the * .
I think I can figure out the redacting part. I just cannot seem to figure out how to read the words in... any help is much appreciated!
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
string *redact = new string[n]
for(int i = 0; i < n; ++i)
cin >> redact[i] // this part works!
return 0;
}
;... panic?