VSCode+ various locale configurations
Table of contents
1. C++
New C++ sample code
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> msg {
"Hello", "C++", "World", "from", "VS Code!"};
for (const string& word : msg)
{
cout << word << " ";
}
cout << endl;
}
Click the settings on the right, select "C/C++: g++.exe build and debug active file", run and compile to get the .exe file and output
Two, C
#include <stdio.h>
#include <stdio.h>
#include <string.h>
int main()
{
char *msg ="Hello C World from VS Code!";
printf("%s",msg);
return 0;
}
Click the settings on the right, select "C/C++: gcc.exe build and debug active file", run and compile to get the .exe file and output
3. Python
msg = "Hello Python World from VS Code!"
print(msg)
Because the Python environment has been added to the system path, you only need to select the Python file at runtime