Solved

Want help on command line parameters

Posted on 2004-04-13
5
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
Sys_Prog earned 125 total points
ID: 10820059
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

695 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