点击,然后这里选Others,出现task.json,如下;
"version": "2.0.0", "tasks": [ { "label": "echo", "type": "shell", "command": "echo Hello" } ]
修改如下;
"version": "2.0.0", "tasks": [ { "label": "build hello", "type": "shell", "command": "g ", "args": [ "-g", "hello.cpp", ], "group":{ "kind": "build", "isDefault": true } } ]
回到hello.cpp文件,按F5。成功运行编译。
5.还有就是发现中文控制台显示乱码,
只要点击右下角utf-8,