Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit e11d88c

Browse files
committed
Update readme
1 parent f99b493 commit e11d88c

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# CLI template for C/C++
22

3-
This is template app for CLI test.
4-
You can make console application by editing files under src directory.
5-
As default, app.cpp has `main` function. You can start to develop from here.
3+
Implement CLI application by editing [src/app.cpp](src/app.cpp).
4+
You may add new files to keep your code clean, if it is allowed in your challenge.
65

76
## How to get input parameters
8-
Same as ususal C++ application, `main` function takes following parameters.
9-
app.py has a function `main`
10-
11-
- `int argc`: The number of parameters. (including program name.)
12-
- `char *argv[]`: The array of char pointer.
7+
You can get arguments with ordinary C++ way, using `int argc` and `char * argv[]`.
8+
9+
```cpp
10+
int main(int argc, char * argv[])
11+
{
12+
// code to run
13+
return 0;
14+
}
15+
```
1316
1417
## How to output result
1518
You can use `cout`, `printf`, etc.

README_ja.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# CLIアプリケーション作成用テンプレート(C/C++)
1+
# コマンドラインアプリケーション(CLI アプリ)作成用テンプレート(C/C++)
22

3-
C/C++でCLIアプリケーションを作成するためのテンプレートです。
4-
5-
srcフォルダ以下の*.cppファイルを編集することでCLIアプリケーションを作成することができます。
6-
デフォルトでは[app.cpp](src/app.cpp)ファイルにmain関数が定義されているのでそこから開発を開始してください。
3+
[app.cpp](src/app.cpp)を編集して、CLIアプリを実装してください。
4+
チャレンジ内でファイルの作成が許可されていれば、可読性等のためにファイルを分割する事も可能です。
75

86
## コマンドライン引数の取得方法
9-
通常のC++アプリケーションと同じです。
10-
main関数の引数として
11-
12-
- `int argc`: 引数の総数(プログラム名を含む)
13-
- `char *argv[]`: 引数の文字列を指すポインタの配列
14-
15-
が渡されます。
7+
通常のC++アプリケーションと同じように、`int argc``char * argv[]` を使用してください。
8+
9+
```cpp
10+
int main(int argc, char * argv[])
11+
{
12+
// code to run
13+
return 0;
14+
}
15+
```
1616
1717
## コマンド実行結果の標準出力への出力
1818
cout、printf等標準出力に出力する任意のメソッドが使用可能です。

0 commit comments

Comments
 (0)