unsigned charポインターの用途は何ですか? ポインターがポインターに型キャストされていることを多くの場所で見てきましたunsinged char。なぜそうするのですか?
へのポインタを受け取り、intそれを に型キャストしunsigned char*ます。しかし、cout を使用してその配列の要素を出力しようとすると、何も出力されません。なぜ?理解できません。私はc ++が初めてです。
以下のサンプルコードを編集
int Stash::add(void* element)
{
    if(next >= quantity)
    // Enough space left?
        inflate(increment);
    // Copy element into storage, starting at next empty space:
    int startBytes = next * size; 
    unsigned char* e = (unsigned char*)element;
    for(int i = 0; i < size; i++)
        storage[startBytes + i] = e[i];
    next++;
    return(next - 1); // Index number
}