I am trying to read in a sentence to unscramble, however something is going wrong. When I enter no character it'll print out "The sentence is" and "Decoded sentence is", but when I enter one or more characters it'll just sit there and do nothing. I don't think it could be an error with MySentence class because it does not even print "The sentence is".
#include <iostream>
#include <stdio.h>
#include "MySentence.h"
#include "Corpus.h"
#include <string>
using namespace std;
int main() {
Corpus corp;
std::cout << "The proportions are: ";
for(int i = 0; i<26; i++) {
cout << corp.proportion(i+97) <<", ";
}
cout << endl;
cout << "Enter sentence terminated by <ENTER> ";
string s= "";
getline(cin, s);
cout << "The sentence is " << s;
MySentence sent(s);
sent.decode(corp);
cout << endl << "Deoded sentence is: " << sent.sentence;
return 0;
}