Command line arguments

This is a discussion on Command line arguments within the C++ Programming forums, part of the General Programming Boards category; How do you run a program from the command prompt?? Say if i have a program called 18_3. My command ...

  1. #1
    Unregistered
    Guest

    Question Command line arguments

    How do you run a program from the command prompt??
    Say if i have a program called 18_3. My command prompt looks like this C:\Documents and settings\Administrator>.

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,681
    If the prog is located in that same directory then you just type in the name of the prog.
    I used to be an adventurer like you... then I took an arrow to the knee.

  3. #3
    Unregistered
    Guest

    Question commandline arguments

    Ok I'm still lost, Im using MSVS 6.0. I have a program called 18_3
    It should copy test.txt to output_file_1.txt. Now 18_3 is waiting for three arguments I hope, but I don't know how to send them to it. At the command prompt I type in the name of the program and the names of the files which the program is waiting for. windows comes back with '18_3' is not recognized as an internal or external command, operable program or batch file. Not sure what I'm doing wrong. my book gives this as an example.

  4. #4
    Unregistered
    Guest

    Talking LOL!!!

    My exe was tucked away in the debug file, also had to get to the correct path in dos. Once I did that the program worked just fine!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 03:27 PM
  3. command line arguments
    By vurentjie in forum C Programming
    Replies: 3
    Last Post: 06-22-2008, 06:46 AM
  4. Replies: 10
    Last Post: 09-27-2005, 12:49 PM
  5. NULL arguments in a shell program
    By gregulator in forum C Programming
    Replies: 4
    Last Post: 04-15-2004, 10:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21