vendredi 3 avril 2015

How to keep command prompt open even after getting an output in sublime text 2

I'm learning C through K & R and for it I'm using Turbo c++ v 4.5. Since it is and ancient compiler I have been searching for better one and came across Sublime Text 2 editor. I have managed to create a build file and it works fine to capture errors and to give correct output.

However, after giving an output, command prompt closes itself within a second.I can barely analyze an output.

I'm using 32-bit windows xp sp3 and MinGW as a compiler.

Here is my build file :



{
"cmd" : ["gcc", "-Wall", "-time", "$file" , "-o", "$file_base_name"],
"selector" : "source.c",
"shell" : true,
"working_dir" : "$file_path"
}


Steps I follow:

1.I write program in sublime and build it using above build file.

2.Then I go to folder where I have saved my written programs.

3.I find application file(.exe) of program I've written previously and double click it to open.

4.I enter inputs and command prompt closes itself after a millisecond of printing an output.



So my question : Is there any way to keep open command prompt for some time or it should be closed when I do it manually. If it is possible please post execution build file for 'C' so I can get output in Sublime itself.


Aucun commentaire:

Enregistrer un commentaire