Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8940615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:04:46+00:00 2026-06-15T11:04:46+00:00

Another ‘new’ thing I’ve had to consider tonight: int main(argc, char *argv[]) I can’t

  • 0

Another ‘new’ thing I’ve had to consider tonight:

int main(argc, char *argv[])

I can’t see why I’d want to read in from the cmd line, but you never know! Why wouldn’t I just use getline and read it into a string? Or getch if it were something else?

I suspect the answer is something to do with the amount of code to process – using something like this over #include <string> is bound to use less computational power, correct?

EDIT: A year on looking back at this I feel pretty silly, had never really been taught about cmd line input for programs at university (I know right, what kinda course am I on..) 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:04:48+00:00Added an answer on June 15, 2026 at 11:04 am

    Being a games programmer, I can’t see why I’d want to read in from the cmd line, but you never know!

    Usually, for a GUI program, things passed in via command line tend to be hidden or debugging options.

    For example, IE has a -k command line switch that cannot be set in the normal preferences. That switch makes IE run in kiosk mode with lots of stuff disabled. This is something regular users should never want to do because if you run IE in kiosk mode you have no access to anything else (it’s like turning Windows into MsIeOS).

    Google chrome has a command line argument --first-run that forces it to re-initialize the user preferences and pop up the first run settings dialog. This is very useful if you happen to corrupt your Chrome preferences.

    Games are similar. Halo2 has a -windowed command line argument that starts the game in a window instead of fullscreen. Here’s a list of Halo2 command line arguments: http://support.microsoft.com/kb/830487

    If you can’t think of any use of command line arguments then don’t use it. That doesn’t mean that other people can’t find a use for it.

    For various programs, just google “[program name] command line arguments” to find out what, if any, there are. You’ll find programs written by people who, like you, can’t think of any use for command line arguments and so the programs don’t have any.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Another developer tells me that there is a MySQL ConnectorJ option which can be
Another Umbraco question, apologies. I've created a new template in the Master templates list,
Another thread had this quote Erlang VM BEAM and HiPE is written mostly in
Another Linq question =) So I have a certain interface that I can code
Another way to ask this: If I wrote doctests in reST, can I use
Another program, outside my own program, creates a new PowerPoint presentation. When it does,
Another recent C# interview question I had was if I knew what Boxing and
Another cross-language question: can someone tell me what C# Threading constructs best match the
Another answer states: You can only use the Version Release Control on app updates.
another questions... How can i make this textfield?? With on the left a FIXED

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.