big146's code solves the limit of 40 characters that InvariantLoop's code has.
However, it does have the same problem in that it will only get "hi" and stop at the first space.
To fix both, you would want to use getline which gets an entire line instead of >> which only reads to the next whitespace. One problem with mixing >> and getline (which you would be doing since InvariantLoop's code gets an integer first) is that the >> leaves a newline in the input stream, so the getline will stop there if you don't ignore that newline.
Note, you can also use a form of getline that works with char. That getline is a member of cin, so you would use:
using namespace std;
//int counter = 0;
cout << "Enter the number you want to loop"<<endl;
cin >> num;
cout<< "Enter the phrase you want to loop"<<endl;
for (int i=0; i<num; i++)
cout<<"\nLoop executed: "<<num<<" time(s).\n";
cout <<"Do you really think that "<<theString<<" is true?\n";