Reputation: 23
I am using vscode to write c++ programs in macOS. However I find it hard to debug, and the output of the console is always out of format.
My code is like
#include <stdio.h>
#include <iostream>
using namespace std;
int
main()
{
printf("Hello World\nWelcome to go to C++\n");
cout << "hello world" << endl;
return 0;
}
And the output of the console is
=thread-selected,id="1"
@"Hello World\r\n"
@"Welcome to go to C++\r\n"
@"hello world\r\n"
So is there any configuration I forget to set? Or there's another problem?
Please tell me how to fix that.
Upvotes: 2
Views: 3329
Reputation: 224
This looks like it is correctly formatted, in that the newlines are where they were specified. Although the line endings printed look different.
Perhaps this thread https://github.com/Microsoft/vscode/issues/2957 can help with user configuration settings to set line endings.
Upvotes: 1