I have a c++ program,it takes a BMP file and do some operations on the
file. What I want to know is how to get the file name automatically
and run the program in batch mode as I have to run this for large No
of files.
Questions regarding the C++ programming language should be directed to
comp.lang.c++ and not comp.lang.c. Regardless, the answer for this is
pretty much the same.
You can get input from the command line arguments using argv or you can
get input from stdin. If you can code the program so it works with either
method, most operating systems will have a way of making this batch mode.
How you do that depends on the operating system and would be outside the
scope of comp.lang.c (or comp.lang.c++).
So, write a program that will get the filename from stdin or one that will
get the names from the command line. The command line method might have a
limit. If you have a huge number of filename you might want to go with
stdin. If you are having problems with this program ask for help in
comp.lang.c++. Once you get it working manually, find a newsgroup that
deals with your operating system and ask how you can process many files
with this program.