Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » ArgcArgv – use argc and argv under Ultimate++!
ArgcArgv – use argc and argv under Ultimate++! [message #3910] |
Sat, 08 July 2006 21:52 |
Werner
Messages: 234 Registered: May 2006 Location: Cologne / Germany
|
Experienced Member |
|
|
CmdLineArgs - a free model application
If you need to forward the command line arguments your Ultimate++ application is started with to another application or especially a library which you do not control, this can be a problem. The target application or library might expect the command line arguments to be passed in a way complying with the C++ standard. Ultimate++ CommandLine() doesnt meet this expectation in many regards.
So I created ArgcArgv which provides int argc and char* argv[]. These variables behave exactly as the standard requires. ArgcArgv can easily be integrated in any application. CmdLineArgs shows how.
I publish the 2 files ArgcArgv.hpp and ArgcArgv.cpp which provide the solution and the 3 files CmdLineArgs.h, CmdLineArgs.lay, and main.cpp which make up the demo application as well as CmdLineArgs.upp zipped to create a single file - as an attachment to this mail hoping that this will be useful to somebody.
I declare the code, which is thoroughly commented, public domain. Still I would really appreciate if a possible user informed me of errors or any improvements.
Werner
P. S.:
The files have been updated. Please use the new package attached to message #8046.
W.
[Updated on: Mon, 05 February 2007 20:28] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu May 16 13:00:44 CEST 2024
Total time taken to generate the page: 0.01903 seconds
|