次のように定義された構造がある場合:
struct image{
unsigned int width, height;
unsigned char *data;
};
そして、このタイプの 2 つの変数:
struct image image1;
struct image image2;
image1 から image2 のデータにデータを転送したい (image1 にはデータが書き込まれ、image2 には malloc または calloc で割り当てられたデータがあると仮定)。どうすればそれができますか?どうもありがとう。