Thread: Command line arguments

  1. #1

    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
    Northern Virginia/Washington DC Metropolitan Area
    If the prog is located in that same directory then you just type in the name of the prog.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3

    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

    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