I am trying to build a command line application, i'm at the start, and I am trying to get an wchar_t input and print it, but if I type in "foo foof" for example, it prints foo>>> foof>>>
.
Here is my code:
#include <iostream>
using namespace std;
int main()
{
while (1 == 1)
{
wchar_t afterprint[100];
wcout << "\n>>> ";
wcin >> afterprint;
wcout << afterprint;
}
return 0;
}
And this is what happens in the console:
>>> foo foof fofof
foo
>>> foof
>>> fofof
>>>
What I am expecting to happen, is for it to print what was entered, on one line.
Help would be highly appreciated, and I am sorry if the answer is really obvious, because I am new to C++.