可能性の重複:
How are objects stored in memory in C++?クラスのメモリはC++でどのように処理されますか?
例えばC++クラス:
[identifier of A] [this is int value] [this is void addOne(void)][value++]:
class A{ int value; void addOne(){ value++; } }
は、クラスAのインスタンスは、この[擬似コード]のようにロードされますまたは、次のように指定します。
[members identifier of A] [this is int value]2番目に少ないメモリが必要ですあるクラスの複数のインスタンスですべてのインスタンスで同じ関数が使用されるためです。メモリはC++でどのように処理されますか?メモリ操作を変更することは可能ですか?[functions identifier of A] [this is void addOne(ref to member of A)][A.value++]
「Aの識別子」とは何を意味していますか?または "Aのメンバー識別子"? –
実際は申し訳ありませんが、それは適切な複製ではありませんでした。 – GWW
これはあなたの質問に答えますか? http://stackoverflow.com/questions/2006504/c-data-alignment-member-order-inheritance/2007980#2007980 – Beanz