How to read command line arguments in vc++
-
What type of application are you working on? If it's a simple console based application you can read the information in the main function (usually named as argc and argv). Also you can see here:Reading Command line arguments[^]
You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_
-
...and if you're using MFC, see
m_lpCmdLine
, which is a member ofCWinApp
.It is a crappy thing, but it's life -^ Carlo Pallini
-
Command line arguments are available in the
main
function of your program (that isWinMain
for a GUI application). If you're usingMFC
, your-CWinApp
-derived class provides them_lpCmdLine
[^] member. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Command line arguments are available in the
main
function of your program (that isWinMain
for a GUI application). If you're usingMFC
, your-CWinApp
-derived class provides them_lpCmdLine
[^] member. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
GetCommandLine ?