Pradyumn Shrivastava
Pradyumn Shrivastava

Reputation: 409

How to compile and run (by a single command) a C++ program manually on MS DOS instead of Borland?

I do this now by running two commands.

C:\TC\Bin>tcc test.cpp
C:\TC\Bin>test

Is there any way to accomplish this by using just one command?

Upvotes: 1

Views: 541

Answers (1)

Anonymouse
Anonymouse

Reputation: 945

As Basile Starynkevitch said you could write a batch file... This version has error checking for compile errors...

@Echo off tcc test.cpp if errorlevel 1 goto FAILED test.exe

:FAILED

As your project gets more complicated consider using MAKEFILE's

Upvotes: 1

Related Questions