エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
メモリリークしない安全なプログラムの書き方
とりあえず動くプログラムを書く ここでは例として、Fooという構造体の2次元配列を、引数で指定された... とりあえず動くプログラムを書く ここでは例として、Fooという構造体の2次元配列を、引数で指定された幅と高さで作る、createFooMatrixという関数を作ってみます。 なお、配列の各要素を、initializeFoo関数で初期化しています。 Foo **createFooMatrix ( int width, int height ) { Foo **ptr = NULL; int w, h; ptr = (Foo **)malloc(height * sizeof(Foo *)); for (h = 0 ; h < height ; h++) { ptr[h] = (Foo *)malloc(width * sizeof(Foo)); for (w = 0 ; w < width ; w++) { initializeFoo(&ptr[h][w]); } } return ptr;
2011/08/16 リンク