Skip to content

janderkkotlarski/correct_cpp_hello_cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

correct_cpp_hello_cli

Branch Travis CI Codecov
master Build Status codecov.io

Correct C++ chapter 'Hello CLI'.

Goal

  • Write a command-line interface (CLI) application

Prerequisites

Exercise

Write a command-line interface (CLI) program that writes Hello to the screen.

If the user has supplied a command-line argument, show it, after adding a space between 'Hello' and the argument. Ignore command-line arguments beyond the first. In all cases, the output should be followed by a newline:

Call to hello_cli Result
./hello_cli Hello (with newline)
./hello_cli world Hello world (with newline)
./hello_cli world i_am_ignored Hello world (with newline)

This is the code you start with:

main(argc, argv)
{
  //Your code here
}

External links

References

Packages

No packages published

Languages

  • QMake 79.2%
  • C++ 20.8%