running a compiled C++ file multiple times

I am using linux to compile and run simulation programs based on C++ on the terminal window. This is the command that I use to run the program:
./filename-dbg

Is there any way I can run this multiple times, without having to type it again each time it finishes running?
Like, can i have another program, which would run this program in a loop?

I urgently need some help!!

Thanks in advance!
 
Look up bash shell script tutorials or just write a C/C++ program that does nothing but loop as so:

for(;; ) // whatever bounds you want

system("./filename-dbg");
 
Back
Top