on MS-Windows os, use FindFirstFile() and FindNextFile() to iterate through all the files in a folder. *nix has opendir() and readdir(). boost libraries have os-independent c++ classes.
useing these functions you don't have to know anything about the file names or how many files there are. Just check the file's attributes (also returned by those functions) to insure the file name is not a folder/directory.
You need to escape the \ character since the it is seen by the compiler as the language construct.
You can do something like: sprintf( acFilename, "c:\\a%d.txt", count ) ; Use \ to escape the special \ character. In C and C++ \ is the escape character used to escape some special characters like ", ' and so on..
Also I think it is not a good practice to use \\ since its not portable. If possible try using sprintf( acFilename, "c:/a%d.txt", count ) ; which is a much better way to do things the right way.;)
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"