> For the complete documentation index, see [llms.txt](https://help.diarkis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.diarkis.io/diarkis-client/samples/cpp.md).

# C++

## C++ サンプルのビルドと実行方法

## サンプル全般

1. samples 以下に、"サンプル名\プラットフォーム名" というフォルダ構造でサンプルのファイルが含まれていますので 各フォルダの .sln ファイルを Visual Stduio で開きます。
2. プロジェクト>プロパティ>デバック>コマンド引数 を指定します。

   ```
    $(endPoint) $(uid) $(clientKey) 例 192.168.XXX.XXX:7000 2222 5599933
   ```
3. F5 でビルド実行。 出力ウィンドウに実行状況が表示されます。
4. 複数クライアントを実行する際は、Windows ターミナル(コマンドプロンプト)などから、別プロセスで複数クライアントを実行します。

   ```
   > .\x64\Debug\matchmaker_ticket.exe $(endPoint) $(uid) $(clientKey)
   例 : matchmaker_ticket.exe 192.168.XXX.XXX:7000 2222 5599933
   ```

## iOS シミュレーター向けサンプル・ビルド

1. Xcode で `Product` > `Destination` > `Destination Architectures` > `Show Rosetta Destinations` を確認します
2. トップバーの run destination をクリックし、Rosetta simulator を選択します
3. `Build Settings` > `Search Paths` を開きます
4. サーチパスの順番を `../../../platforms/ios/iOS-Simulator/lib_static` が上に来るように調整します

## Android サンプルの実行

1. VisualStudio でプロジェクトを右クリックして `Properties` を開きます
2. `Debugging` に移動します
3. 起動時の引数を `Launch Flags` で設定します。 引数は `--es` オプション(intent arguments) をつけて指定します。
4. e.g.

   ```
   --es host 192.168.55.117:7000 --es uid 1111 --es clientKey AAAA
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.diarkis.io/diarkis-client/samples/cpp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
