|
-
Dec 7th, 2003, 08:18 AM
#1
Command line?
Managed C++...
How do you get the command line string passed into the app?
Its for a console program.
Code:
int main(?????)
{
Console::WriteLine("This is the command line: {0}", ?????);
Console::ReadLine();
return 0;
}
I don't live here any more.
-
Dec 7th, 2003, 09:01 AM
#2
In C you add the following two arguments to main:
int main (int argc, char * argv[])
The first argument is the number of command line arguments passed and the second is an array of pointers to char which point to each command line string.
I'm not sure if it is different in C++, but worth are try.
-
Dec 7th, 2003, 02:43 PM
#3
Hyperactive Member
-
Dec 7th, 2003, 04:35 PM
#4
Same in C++, but Managed C++ might use a managed String array.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|