Link to home
Start Free TrialLog in
Avatar of bert1
bert1

asked on

I want to GetCmdLine!

How do I write the code to get the command line when I run an .exe file?
I have tried with GetCmdLine procedure but I cant get it to work. Here is the code:
class TTestApp : public TApplication {
  public:
         static string& cmdLine;
    TTestApp() : TApplication() {}
    void InitMainWindow();
};
string& TTestApp::cmdLine = GetCmdLine();
MessageBox(cmdLine, "", MB_OK);

I want to print the cmdLine in a MessageBox!
Avatar of bert1
bert1

ASKER

MessageBox((const char*)TTestApp().cmdLine, "", MB_OK);

This dont give me the right string ... I got like X*y

I need help!
ASKER CERTIFIED SOLUTION
Avatar of KangaRoo
KangaRoo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial