sublimetext2 - Run C++ file with input in Sublime Text 2 -


after compilation of c++ source code, want run input file through sublime text command. how can done?

if mean parameter after c++ build file, have found way in dodgy way... created new build system c++11 , added input file (see input_file below) run section.

{ "cmd": ["g++", "-wall", "-wextra", "-pedantic", "-std=c++0x",   "${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": ["bash", "-c", "g++ -wall -wextra -pedantic -std=c++0x '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}' input_file"]     } ]} 

save file, example c++11.sublime-build, in $home/.config/sublime-text-2/packages/user. choose build system c++11 , should job.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -