N
News
Hi folks I've got a really easy question yet I can't seem to get an answer from any book.
I am playing around with ARGV and ARGC and I think I understand the use of these parameters pretty well but I just can't see to figure out how to execute the program from the command line. My file is test.cpp and the paramter is to print something. Here are my questions:
At the command prompt I type:
a.. "test Mike "... file not recognize.
b.. "test.exe Mike" ... file not recognized
c.. "test.cpp Mike" ... cmd window minimizes but now print out to the screen.
Yes, I have the right print statement ... cout << "print something" << endl.
1. Is there a switch or option that I need to turn on to compile the program into a *.exe file or something?
2. What is the format that I am looking to execute *.cpp, *.c, *.exe ....?
3. Is there are particular place that "this" file type is stored perhaps that is different then the *.cpp/c files?
4. Is there are preprocessor directive that I need to enter into the code?
I am stumped.
FYI -- I am using MS Visual Studio C++ (Studio.net 2003)
Any help is much appreciated!
Dave
I am playing around with ARGV and ARGC and I think I understand the use of these parameters pretty well but I just can't see to figure out how to execute the program from the command line. My file is test.cpp and the paramter is to print something. Here are my questions:
At the command prompt I type:
a.. "test Mike "... file not recognize.
b.. "test.exe Mike" ... file not recognized
c.. "test.cpp Mike" ... cmd window minimizes but now print out to the screen.
Yes, I have the right print statement ... cout << "print something" << endl.
1. Is there a switch or option that I need to turn on to compile the program into a *.exe file or something?
2. What is the format that I am looking to execute *.cpp, *.c, *.exe ....?
3. Is there are particular place that "this" file type is stored perhaps that is different then the *.cpp/c files?
4. Is there are preprocessor directive that I need to enter into the code?
I am stumped.
FYI -- I am using MS Visual Studio C++ (Studio.net 2003)
Any help is much appreciated!
Dave