Solved

Want help on command line parameters

Posted on 2004-04-13
5
291 Views
Last Modified: 2010-04-01
Hi,
I am pretty much new to VC++. I am actually working on getting command line parameters to VC++ app. I have pasted my code into it:
int WINAPI WinMain(HINSTANCE hInstance,
                           HINSTANCE hPrevInstance,
                           LPSTR lpCmdLine,
                           int nCmdShow)
{
char* str2 = lpCmdLine;
//This actually gets only the first argument from the arguments list.
}
Eg: C:\>Hello.exe Test this out
I get only Test in the output.

Could somebody tellme how to get the command line parameters into this code.


Thanks in advance,
Pampa
0
Comment
Question by:pampa34
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Sys_Prog
ID: 10820035
0
 
LVL 10

Accepted Solution

by:
Sys_Prog earned 125 total points
ID: 10820059
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question