久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      如何在vscode編寫c語(yǔ)言

      如何在vscode編寫c語(yǔ)言

      1、安裝vscode(版本1.27)

      https://code.visualstudio.com/ 下載安裝vscode。

      2、安裝c/c++擴(kuò)展。

      如何在vscode編寫c語(yǔ)言

      3、安裝編譯工具mingw-w64,http://www.mingw-w64.org/doku.php/download

      配置環(huán)境變量,以WIN10為例 ,此電腦-屬性-高級(jí)系統(tǒng)設(shè)置-環(huán)境變量-系統(tǒng)變量-path-添加一條D:Program Filesmingw-w64i686-8.1.0-posix-dwarf-rt_v6-rev0mingw32bin(你安裝編譯工具路徑)

      配置前

      如何在vscode編寫c語(yǔ)言

      配置后

      如何在vscode編寫c語(yǔ)言

      -ps:如果開著vscode配置環(huán)境變量,配置完要關(guān)掉vscode重開一次。

      4、配置文件launch.json,task.json。

      新建文件hello.cpp,

      如何在vscode編寫c語(yǔ)言

      按F5彈出選擇環(huán)境,配置launch.json

      如何在vscode編寫c語(yǔ)言

      點(diǎn)擊進(jìn)去,configurations:里內(nèi)容如下:

      {  "name": "(gdb) Launch",  "type": "cppdbg", "request": "launch",  "program": "enter program name, for example ${workspaceFolder}/a.exe",  "args": [],  "stopAtEntry": false,  "cwd": "${workspaceFolder}",  "environment": [],  "externalConsole": true,  "MIMode": "gdb",  "miDebuggerPath": "/path/to/gdb",  "setupCommands": [  {  "description": "Enable pretty-printing for gdb",  "text": "-enable-pretty-printing",  "ignoreFailures": true  }  ]  }

      修改成如下:

      {  "name": "(gdb) Launch",  "type": "cppdbg", "request": "launch",  "program": "${workspaceFolder}/a.exe",//這里刪除前面那里的enter program name, for example  "args": [],  "stopAtEntry": false,  "cwd": "${workspaceFolder}",  "environment": [],  "externalConsole": true,  "MIMode": "gdb",  "miDebuggerPath": "D:\Program Files\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gdb.exe", //修改為你安裝mingw32的路徑  "setupCommands": [  {  "description": "Enable pretty-printing for gdb",  "text": "-enable-pretty-printing",  "ignoreFailures": true  }  ],  "preLaunchTask": "build hello",//task.json里面的名字  }

      回到hello.cpp按F5彈出報(bào)錯(cuò)框,選配置任務(wù)。

      如何在vscode編寫c語(yǔ)言

      點(diǎn)擊,然后選Others,出現(xiàn)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             }         }      ]

      注意:如果是win32程序(窗口界面),args內(nèi)加上"-mwindows"。

      如何在vscode編寫c語(yǔ)言

      回到hello.cpp文件,按F5。成功運(yùn)行編譯。

      如何在vscode編寫c語(yǔ)言

      5、還有就是發(fā)現(xiàn)中文控制臺(tái)顯示亂碼。

      如何在vscode編寫c語(yǔ)言

      只要點(diǎn)擊右下角utf-8。

      如何在vscode編寫c語(yǔ)言

      點(diǎn)擊使用編碼保存,選GBK,然后按F5運(yùn)行。

      如何在vscode編寫c語(yǔ)言

      PHP中文網(wǎng),有大量免費(fèi)vscode入門教程,歡迎大家學(xué)習(xí)!

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)