Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Cでプロジェクト用の目覚まし時計を作成しています。mgp123コマンド(パッケージmpg321内)を使用してアラーム音を実行しています。UBUNTUユーザー専用です。mpg321がインストールされているかどうかを確認するプログラムが必要です。パッケージmpg321がCプログラムを使用してインストールされている場合、Cを使用してどのように見つけることができますか?
あなたが使用することができますsystem()
system()
system("mpg321 -h");
コマンドmpg321がインストールされていないよりもエラーを返す場合
mpg321