Thread: Command Line User Input

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    47

    Command Line User Input

    I was wondering how to get a variable from user input from a command line, like seen in Borland C++ and other compilers. For example, you go to the command line and type "bcc32", and it gives you information about the program. But you type "bcc32 TestProgram.cpp" and it compiles TestProgram.cpp! How do I make it so the user can enter something like "TestProgram.cpp", and the program responds a certain way?

    Thanks!
    ~Matt3000
    Windows XP Service Pack 2
    Borland C++ Compiler Version 5.5

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Wait, wait - I know this one! - Woooo!!!!!
    http://faq.cprogramming.com/cgi-bin/...&id=1043284392

    I've been here over 5 years now and I finally get to answer a question - rejoice rejoice.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  2. SSH Hacker Activity!! AAHHH!!
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 03-06-2005, 03:53 PM
  3. Nested Structures - User Input
    By shazg2000 in forum C Programming
    Replies: 2
    Last Post: 01-09-2005, 10:53 AM
  4. ~ User Input script help~
    By indy in forum C Programming
    Replies: 4
    Last Post: 12-02-2003, 06:01 AM
  5. Getting user input for filename loop
    By jpchand in forum C++ Programming
    Replies: 1
    Last Post: 09-16-2003, 06:37 AM