Command Line User Input

This is a discussion on Command Line User Input within the C++ Programming forums, part of the General Programming Boards category; I was wondering how to get a variable from user input from a command line, like seen in Borland C++ ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 02:53 PM
  3. Nested Structures - User Input
    By shazg2000 in forum C Programming
    Replies: 2
    Last Post: 01-09-2005, 09:53 AM
  4. ~ User Input script help~
    By indy in forum C Programming
    Replies: 4
    Last Post: 12-02-2003, 05: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

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