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 6380685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:18:00+00:00 2026-05-25T02:18:00+00:00

I am writing a console application which is rapidly gaining many command line arguments

  • 0

I am writing a console application which is rapidly gaining many command line arguments and flags. For this reason I want the user to be able to access a description of these flags and what purpose they serve.

There are several possible solutions I can think of

  • I could write a README file and just stick it in the same directory as the executable. Advantages are it is simple and portable, but disadvantage is that it is easy for someone to remove/edit the file.
  • I could stick the whole message in a variable inside my program and print this to the screen when the user types mycmd --help or something similar. Advantages, stays with executable and not editable, disadvantage is in code since I would have something like that below floating around.

    const char[] helpmsg = "Line1\n"
                           "Line2\n"
                           "...\n"
                           "LineN\n";
    
  • I could write a man entry for my program but this isn’t very portable as the application will be used pretty equally on Windows and Linux.

I’m aware the question is probably a matter of taste but I was just curious if there are any other solutions which I haven’t thought of that people have used in the past.

Ideally it would be something which is easy for the developer (at the moment me) to edit and keep updated but where others cannot really mess with it.

  • 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-05-25T02:18:00+00:00Added an answer on May 25, 2026 at 2:18 am

    Consider using the boost program options library.

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

Sidebar

Related Questions

I'm writing a C console application, and I want to parse command line arguments
I'm writing a console application in which user interaction might be necessary (prompt for
I am writing a console based Java application in which the user will be
I am writing a console application which makes use of the F1 key (for
I'm writing a console application which is looking up information about SSIS packages in
Okay, simple situation: I'm writing a simple console application which connects to a SOAP
I'm considering writing a console application in C# and I want to incorporate history,
I'm writing a console based application that prompts a user for a series of
hello I am writing a c# comand line application which interacts with mysql db.
I am writing a Console application using C#, in which I am firing Print

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.