richelbilderbeek / correct_cpp_hello_cli

Correct C++ chapter 'Hello CLI'

Home Page:https://github.com/richelbilderbeek/correct_cpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

correct_cpp_hello_cli

Branch Travis CI Codecov
master Build Status codecov.io

Correct C++ chapter 'Hello CLI'.

⚠️ this course does not work until I've updated the scripts to use GitHub Actions ⚠️

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

About

Correct C++ chapter 'Hello CLI'

https://github.com/richelbilderbeek/correct_cpp

License:GNU General Public License v3.0


Languages

Language:QMake 65.1%Language:Shell 33.0%Language:C++ 1.9%