Hi friends,
Can anyone tell me how can we count number of files in a folder ?
I want to do this using C language and without system() function .
I am using Windows-7 OS and MS Visual C++ compiler.
Hi friends,
Can anyone tell me how can we count number of files in a folder ?
I want to do this using C language and without system() function .
I am using Windows-7 OS and MS Visual C++ compiler.
To the best of knowledge what you want to do can't be done with standard C, you would have to use the windows API to do it (or if portability is an issue then you could research OS portable file handling libraries on the web. I don't know any since I normally just code it in C or C++ but I'm sure there are a few). I could be wrong (and if I am, I hope someone corrects me) but in this case I don't think I am.
Or even (shock), the FAQ.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.