Click here to Skip to main content
15,897,891 members
Articles / Programming Languages / C

Another argument parsing function for C and C++

Rate me:
Please Sign up or sign in to vote.
4.72/5 (9 votes)
18 Oct 2013MIT5 min read 30.2K   362   28  
Argument parsing function identifies both optional and positional arguments.
<?xml version="1.0" encoding="Windows-1252"?>

<VisualStudioProject

	ProjectType="Visual C++"

	Version="9.00"

	Name="ParseExample"

	ProjectGUID="{C1401D84-D040-4641-99CA-7BB2E2470DF6}"

	RootNamespace="ParseExample"

	Keyword="Win32Proj"

	TargetFrameworkVersion="196613"

	>

	<Platforms>

		<Platform

			Name="Win32"

		/>

	</Platforms>

	<ToolFiles>

	</ToolFiles>

	<Configurations>

		<Configuration

			Name="Debug|Win32"

			OutputDirectory="$(SolutionDir)$(ConfigurationName)"

			IntermediateDirectory="$(ConfigurationName)"

			ConfigurationType="1"

			CharacterSet="0"

			>

			<Tool

				Name="VCPreBuildEventTool"

			/>

			<Tool

				Name="VCCustomBuildTool"

			/>

			<Tool

				Name="VCXMLDataGeneratorTool"

			/>

			<Tool

				Name="VCWebServiceProxyGeneratorTool"

			/>

			<Tool

				Name="VCMIDLTool"

			/>

			<Tool

				Name="VCCLCompilerTool"

				Optimization="0"

				AdditionalIncludeDirectories=""

				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"

				MinimalRebuild="true"

				BasicRuntimeChecks="3"

				RuntimeLibrary="3"

				UsePrecompiledHeader="0"

				WarningLevel="3"

				DebugInformationFormat="4"

			/>

			<Tool

				Name="VCManagedResourceCompilerTool"

			/>

			<Tool

				Name="VCResourceCompilerTool"

			/>

			<Tool

				Name="VCPreLinkEventTool"

			/>

			<Tool

				Name="VCLinkerTool"

				LinkIncremental="2"

				GenerateDebugInformation="true"

				SubSystem="1"

				TargetMachine="1"

			/>

			<Tool

				Name="VCALinkTool"

			/>

			<Tool

				Name="VCManifestTool"

			/>

			<Tool

				Name="VCXDCMakeTool"

			/>

			<Tool

				Name="VCBscMakeTool"

			/>

			<Tool

				Name="VCFxCopTool"

			/>

			<Tool

				Name="VCAppVerifierTool"

			/>

			<Tool

				Name="VCPostBuildEventTool"

			/>

		</Configuration>

		<Configuration

			Name="Release|Win32"

			OutputDirectory="$(SolutionDir)$(ConfigurationName)"

			IntermediateDirectory="$(ConfigurationName)"

			ConfigurationType="1"

			CharacterSet="0"

			WholeProgramOptimization="1"

			>

			<Tool

				Name="VCPreBuildEventTool"

			/>

			<Tool

				Name="VCCustomBuildTool"

			/>

			<Tool

				Name="VCXMLDataGeneratorTool"

			/>

			<Tool

				Name="VCWebServiceProxyGeneratorTool"

			/>

			<Tool

				Name="VCMIDLTool"

			/>

			<Tool

				Name="VCCLCompilerTool"

				Optimization="2"

				EnableIntrinsicFunctions="true"

				AdditionalIncludeDirectories=""

				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"

				RuntimeLibrary="2"

				EnableFunctionLevelLinking="true"

				UsePrecompiledHeader="0"

				WarningLevel="3"

				DebugInformationFormat="3"

			/>

			<Tool

				Name="VCManagedResourceCompilerTool"

			/>

			<Tool

				Name="VCResourceCompilerTool"

			/>

			<Tool

				Name="VCPreLinkEventTool"

			/>

			<Tool

				Name="VCLinkerTool"

				LinkIncremental="1"

				GenerateDebugInformation="true"

				SubSystem="1"

				OptimizeReferences="2"

				EnableCOMDATFolding="2"

				TargetMachine="1"

			/>

			<Tool

				Name="VCALinkTool"

			/>

			<Tool

				Name="VCManifestTool"

			/>

			<Tool

				Name="VCXDCMakeTool"

			/>

			<Tool

				Name="VCBscMakeTool"

			/>

			<Tool

				Name="VCFxCopTool"

			/>

			<Tool

				Name="VCAppVerifierTool"

			/>

			<Tool

				Name="VCPostBuildEventTool"

			/>

		</Configuration>

	</Configurations>

	<References>

	</References>

	<Files>

		<Filter

			Name="Source Files"

			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"

			UniqueIdentifier="{A34095FB-2F62-47A9-A652-A941A951F227}"

			>

			<File

				RelativePath=".\ParseExample.c"

				>

			</File>

			<File

				RelativePath=".\get_arguments.c"

				>

			</File>

		</Filter>

		<Filter

			Name="Header Files"

			Filter="h;hpp;hxx;hm;inl;inc;xsd"

			UniqueIdentifier="{03CA8CE8-FCA4-4FD0-B426-16629A6ACA4C}"

			>

			<File

				RelativePath=".\platform_os.h"

				>

			</File>

			<File

				RelativePath=".\get_arguments.h"

				>

			</File>

		</Filter>

		<Filter

			Name="Resource Files"

			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"

			UniqueIdentifier="{9E15610D-F57D-44A3-9EE1-2463FDF1A9DE}"

			>

		</Filter>

	</Files>

	<Globals>

	</Globals>

</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer (Senior)
United States United States
I'm an electrical engineer who has spend most of my career writing software. My background includes Digital Signal Processing, Multimedia programming, Robotics, Text-To-Speech, and Storage products. Most of the code that I've written is in C, C++ and Python. I know Object Oriented Design and I'm a proponent of Design Patterns.

My hobbies include writing software for fun, amateur radio, chess, and performing magic, mostly for charities.

Comments and Discussions