标签:
设置环境变量。右击我的电脑,属性-->高级-->环境变量。
在系统环境变量PATH里添加C:\MinGW\bin(如果里面还有其他的变量,记得添加英文分号;),点击确定,确定,确定
测试MinGW是否安装成功。Win+R,运行cmd命令行,在cmd窗口中执行g++ -v,如下显示即为成功;
{ "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"], "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++", "variants": [ { "name": "Run", "cmd": ["cmd", "/c", "g++", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}"] }, { "name": "RunInCommand", "cmd": ["cmd", "/c", "g++", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & pause"] } ] }
#include<iostream> using namespace std; int main(){ int i; cout<<"input i:"<<endl; cin>>i; cout<<"i="<<i<<" helloworld"<<endl; return 0; }
标签:
原文地址:http://www.cnblogs.com/tufujie/p/5023894.html