i just want to know, is there a command line in C++ language (i know, "command line") that can check that if a file exist and if it does, it will do "something" and if it doesn't exist, it will do "something else". This is really similar to the "IF EXIST" command on Batch. All help will be appreciated.
If this is a question for Windows programming, I can say: Use the Windows API function calls FindFirstFile(), or maybe OpenFile() wth the OF_EXIST flag.
If this is Mac or Linux, I don't know. I also don't know of any C/C++ method as I rarely do file handling with the STL or even good old C.