Hi! Well, argc and argv are used in windows apps just like they're used in every C/C++/Java app. In your main()/WinMain() function you can use them, where argc is the count of arguments and argv is a pointer pointer (or array of pointers) to strings, where the first element of the array is always the name of you app. So myapp.exe hello world gives argv[0] = "myapp.exe" argv[1] = "hellp" argv[2] = "world"
What you do with these is totaly up to you. On Windows you normaly pass them by using the console, a link or via the "open" command of the explorer. To your second problem I guess argv is the solution. When a user clicks a file in the explorer you could specify an open command that takes the filename as the first command line argument, opens it and counts the words.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! |