@echo off
title Running Your Program
if %1==0 (
timer %2
exit
)
exit
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <conio.h>
#include <Windows.h>
using namespace std;
clock_t st,en;
int ret;
void get_time()
{
SYSTEMTIME time;
GetLocalTime(&time);
printf("%4d/%02d/%02d %02d:%02d:%02d.%03d\n",
time.wYear,
time.wMonth,
time.wDay,
time.wHour,
time.wMinute,
time.wSecond,
time.wMilliseconds
/*time.wDayOfWeek*/);
}
void write()
{
printf("\n------------------------------------------------------------\n");
printf("Finish Time: ");
get_time();
en=clock();
printf("Process exited after %.4f seconds with return value %d\n",(double)(en-st)/CLOCKS_PER_SEC,ret);
printf("Press any key to continue...");
getch();
}
int main(int argc,char const *argv[])
{
if(argc!=2){cout<<"ERROR!"<<endl;return 0;}
string argv1=argv[1];
argv1="\""+argv1+"\"";
cout<<argv1<<endl;
printf("Build Time: ");
get_time();
st=clock();
printf("------------------------------------------------------------\n\n");
ret=system(argv1.c_str());
write();
return 0;
}
{
"cmd": ["g++", "${file}", "-o","${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$",
"working_dir": "${file_path}",
"encoding":"cp936",
"selector": "source.c++",
"shell_cmd": "g++ \"$file\" -o \"$file_base_name\" && start run.bat %ERRORLEVEL% \"${file_path}/${file_base_name}\"",
}
安装好后在顶部编辑栏"help-language"下进行语言更换
这是一个支持UTF-8编码格式的转换插件。
这是一个解决中文乱码的GBK编码格式支持插件。
其他
例如各种颜色主题"Theme - XXX"或配色方案"XXX Color Scheme"等,当然也可以自己安装别的。
有关sublime text不同版本的破解方式不尽相同,就算不破解也不会有太大的影响,请尽量支持正版,实在不行请自行百度。
{ "keys": ["ctrl+b"], "command": "build" }
这一行,把前面的"ctrl+b"尽情地改成自己习惯的按键。(为避免冲突,建议新建一个.sublime-keymap --User,将改后的代码复制进去单独保存)[软件]Windows下Sublime Text编译系统搭建(备份)
原文:https://www.cnblogs.com/wjsoj/p/11565328.html